mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 14:21:25 +02:00
CLEANUP: time: switch clockid_t to empty_t when not available
This is cleaner than using an int. We also get rid of the constants that we don't need nor use.
This commit is contained in:
parent
9a85a1700b
commit
80daaa1e9d
@ -106,13 +106,8 @@ typedef struct { } empty_t;
|
|||||||
|
|
||||||
/* systems without such defines do not know clockid_t */
|
/* systems without such defines do not know clockid_t */
|
||||||
#if !(_POSIX_TIMERS > 0) || (_POSIX_C_SOURCE < 199309L)
|
#if !(_POSIX_TIMERS > 0) || (_POSIX_C_SOURCE < 199309L)
|
||||||
#define clockid_t int
|
#undef clockid_t
|
||||||
#undef CLOCK_REALTIME
|
#define clockid_t empty_t
|
||||||
#undef CLOCK_MONOTONIC
|
|
||||||
#undef CLOCK_THREAD_CPUTIME_ID
|
|
||||||
#define CLOCK_REALTIME 0
|
|
||||||
#define CLOCK_MONOTONIC 1
|
|
||||||
#define CLOCK_THREAD_CPUTIME_ID 2
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(TPROXY) && defined(NETFILTER)
|
#if defined(TPROXY) && defined(NETFILTER)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user