From aecf3810c22ac5e904b0eb7bfe26e3168f3f4f43 Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Thu, 10 Aug 2017 22:56:12 +0200 Subject: build: Fix compilation on OS X Sierra --- include/ouroboros/config.h.in | 2 +- include/ouroboros/endian.h | 3 ++- include/ouroboros/time_utils.h | 23 ----------------------- 3 files changed, 3 insertions(+), 25 deletions(-) (limited to 'include') diff --git a/include/ouroboros/config.h.in b/include/ouroboros/config.h.in index 881410eb..d1dac3e9 100644 --- a/include/ouroboros/config.h.in +++ b/include/ouroboros/config.h.in @@ -46,7 +46,7 @@ #define AP_MAX_FQUEUES 64 #define SHM_RDRB_BLOCK_SIZE sysconf(_SC_PAGESIZE) #define SHM_RDRB_MULTI_BLOCK -#define SHM_RDRB_PREFIX "/ouroboros.rdrb." +#define SHM_RDRB_NAME "/ouroboros.rdrb" #define LOCKFILE_NAME "/ouroboros.lockfile" #define SHM_BUFFER_SIZE 1 << 14 #define DU_BUFF_HEADSPACE 128 diff --git a/include/ouroboros/endian.h b/include/ouroboros/endian.h index 873aff73..f93428b7 100644 --- a/include/ouroboros/endian.h +++ b/include/ouroboros/endian.h @@ -24,7 +24,8 @@ #ifndef OUROBOROS_ENDIAN_H #define OUROBOROS_ENDIAN_H -#if defined(__linux__) || defined(__CYGWIN__) || defined(__MACH__) +#if defined(__linux__) || defined(__CYGWIN__) || \ + (defined(__MACH__) && !defined(__APPLE__)) #ifndef _BSD_SOURCE #define _BSD_SOURCE diff --git a/include/ouroboros/time_utils.h b/include/ouroboros/time_utils.h index 35f2dcbb..fc70b1ea 100644 --- a/include/ouroboros/time_utils.h +++ b/include/ouroboros/time_utils.h @@ -79,27 +79,4 @@ int tv_to_ts(const struct timeval * src, int ts_to_tv(const struct timespec * src, struct timeval * dst); -#ifdef __APPLE__ /* morons */ - -/* taken from time.h */ -#define CLOCK_REALTIME 0 -#define CLOCK_MONOTONIC 1 -#define CLOCK_PROCESS_CPUTIME_ID 2 -#define CLOCK_THREAD_CPUTIME_ID 3 -#define CLOCK_MONOTONIC_RAW 4 -#define CLOCK_REALTIME_COARSE 5 -#define CLOCK_MONOTONIC_COARSE 6 -#define CLOCK_BOOTTIME 7 -#define CLOCK_REALTIME_ALARM 8 -#define CLOCK_BOOTTIME_ALARM 9 -#define CLOCK_SGI_CYCLE 10 /* Hardware specific */ -#define CLOCK_TAI 11 - -#define CLOCKS_MASK (CLOCK_REALTIME | CLOCK_MONOTONIC) -#define CLOCKS_MONO CLOCK_MONOTONIC - -int clock_gettime(int clock, - struct timespec * t); -#endif - #endif /* OUROBOROS_TIME_UTILS_H */ -- cgit v1.2.3