diff options
author | Azat Khuzhin <azat@libevent.org> | 2023-05-14 22:00:19 +0200 |
---|---|---|
committer | Azat Khuzhin <azat@libevent.org> | 2023-05-14 22:01:18 +0200 |
commit | 6eba967e1c3aa7a43ef900d8f2e68f2d7867c1e2 (patch) | |
tree | 0bbe2e66d1985f046022a9a1ca99359e077395a5 | |
parent | 5f1fc92b13a964e883091dae7c3701c662dfdc96 (diff) | |
download | libevent-6eba967e1c3aa7a43ef900d8f2e68f2d7867c1e2.tar.gz |
Suppress -Wmacro-redefined for htonll/ntohll in OSX
OSX:
test/regress_ws.c:61:9: warning: 'htonll' macro redefined [-Wmacro-redefined]
#define htonll(x) \
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/sys/_endian.h:141:9: note: previous definition is here
#define htonll(x) __DARWIN_OSSwapInt64(x)
^
test/regress_ws.c:65:9: warning: 'ntohll' macro redefined [-Wmacro-redefined]
#define ntohll(x) htonll(x)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/sys/_endian.h:140:9: note: previous definition is here
#define ntohll(x) __DARWIN_OSSwapInt64(x)
^
-rw-r--r-- | test/regress_ws.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/regress_ws.c b/test/regress_ws.c index df4a84e7..436cb627 100644 --- a/test/regress_ws.c +++ b/test/regress_ws.c @@ -58,10 +58,12 @@ #include "regress_http.h" #include "regress_ws.h" +#undef htonll #define htonll(x) \ ((1 == htonl(1)) \ ? (x) \ : ((uint64_t)htonl((x)&0xFFFFFFFF) << 32) | htonl((x) >> 32)) +#undef ntohll #define ntohll(x) htonll(x) |