vlc_atomic.h: include missing time.h

On MacOS, the checkheader for vlc_atomic.h fails with:

    In file included from checkheader_vlc_atomic_h.c:3:
    /Users/unidan/Workspace/vlc/extras/package/macosx/../../../include/vlc_atomic.h:113:60: error: unknown type name 'time_t'; did you mean 'size_t'?
    int vlc_atomic_timedwait_daytime(void *addr, unsigned val, time_t deadline);
                                                               ^~~~~~
                                                               size_t
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_size_t.h:31:32: note: 'size_t' declared here
    typedef __darwin_size_t        size_t;
                                   ^
    1 error generated.
    make[4]: *** [Makefile:6718: checkheader_vlc_atomic_h] Error 1
This commit is contained in:
Alexandre Janniaux 2023-09-01 11:39:39 +02:00 committed by Jean-Baptiste Kempf
parent 384398f40a
commit b83ed2bf66

View File

@ -38,6 +38,8 @@ using std::memory_order_acq_rel;
# include <vlc_common.h>
# include <vlc_tick.h>
#include <time.h> /* vlc_atomic_timedwait_daytime */
#define VLC_STATIC_RC { \
.refs = ATOMIC_VAR_INIT(0) \
}