hzeller / timg

A terminal image and video viewer.
GNU General Public License v2.0
1.97k stars 74 forks source link

Make error: "use of undeclared identifier 'clock_nanosleep'" #63

Closed anoduck closed 3 years ago

anoduck commented 3 years ago

Received the following error attempting to compile the app in OpenBSD Current (7.0).

 use of undeclared identifier 'clock_nanosleep'
        clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, &time_, nullptr);

I imagine this might have something to do with OpenBSD's use of clang and the absence of GCC from the system.

hzeller commented 3 years ago

Interesting, seems that OpenBSD does not have clock_nanosleep() while the other clock_* functions are available (I see this discussion on the openbsd-tech mailing list).

Anyway, this is now guarded with an #ifdef, could you git pull the latest version and try again ?

hzeller commented 3 years ago

(leaving open until confirmed working)

anoduck commented 3 years ago

It worked like butter! Smooth as silk. Thanks!