It appears that 5b4dd683cb introduced the htonll and ntohll functions in standard.h, but it appears that osx already defines that in sys/_endian.h. I've attached a patch that wraps those functions in ifndefs. For context when I try to compile master with TARGET=generic or TARGET=osx I get:
$ make TARGET=generic
gcc -Iinclude -Iebtree -Wall -O2 -g -fno-strict-aliasing
-Wdeclaration-after-statement -DTPROXY -DENABLE_POLL
-DCONFIG_HAPROXY_VERSION=\"1.6-dev7\"
-DCONFIG_HAPROXY_DATE=\"2015/10/06\" \
-DBUILD_TARGET='"generic"' \
-DBUILD_ARCH='""' \
-DBUILD_CPU='"generic"' \
-DBUILD_CC='"gcc"' \
-DBUILD_CFLAGS='"-O2 -g -fno-strict-aliasing
-Wdeclaration-after-statement"' \
-DBUILD_OPTIONS='""' \
-c -o src/haproxy.o src/haproxy.c
In file included from src/haproxy.c:64:
In file included from include/common/cfgparse.h:30:
In file included from include/proto/proxy.h:26:
In file included from include/common/ticks.h:56:
include/common/standard.h:1007:34: error: expected ')'
static inline unsigned long long htonll(unsigned long long a)
^
/usr/include/sys/_endian.h:141:25: note: expanded from macro 'htonll'
#define htonll(x) __DARWIN_OSSwapInt64(x)
^
/usr/include/libkern/_OSByteOrder.h:78:30: note: expanded from macro
'__DARWIN_OSSwapInt64'
(__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt64(x) : _OSSwapInt64(x))
^
include/common/standard.h:1007:34: note: to match this '('
/usr/include/sys/_endian.h:141:25: note: expanded from macro 'htonll'
#define htonll(x) __DARWIN_OSSwapInt64(x)
^
/usr/include/libkern/_OSByteOrder.h:78:5: note: expanded from macro
'__DARWIN_OSSwapInt64'
(__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt64(x) : _OSSwapInt64(x))
^
... more errors
After the patch it compiles and appears to proxy to a dummy backend I
started up. Haven't really done more testing than that.
Cheers,
-Joey
0001-Fixes-the-build-on-OSX.patch
Description: Binary data

