Tiger does not have the _DARWIN_C_SOURCE override to enable chunks of headers when _POSIX_C_SOURCE is defined, so we have to specifically remove the _POSIX_C_SOURCE from these headers and files for Tiger builds to succeed. This patch could not be sent upstream as is... and probably would not be accepted if it were sent upstream given the age of Tiger. kencu@macports.org diff --git src/sleep.h src/sleep.h index 1958913..1974d8d 100644 --- src/sleep.h +++ src/sleep.h @@ -1,9 +1,11 @@ #ifndef AXEL_SLEEP_H #define AXEL_SLEEP_H +#if (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050) #ifndef _POSIX_C_SOURCE #define _POSIX_C_SOURCE 200112L #endif +#endif static inline int axel_sleep(struct timespec delay) diff --git src/tcp.c src/tcp.c index 6be557b..f42106b 100644 --- src/tcp.c +++ src/tcp.c @@ -38,7 +38,9 @@ /* TCP control file */ +#if (__APPLE__ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050) #define _POSIX_C_SOURCE 200112L +#endif #include "axel.h"