diff options
author | Azat Khuzhin <azat@libevent.org> | 2023-05-14 22:03:26 +0200 |
---|---|---|
committer | Azat Khuzhin <azat@libevent.org> | 2023-05-14 22:03:26 +0200 |
commit | 1f006637ecb23b09f36246e08986b3cb8fbfa562 (patch) | |
tree | 0bbe2e66d1985f046022a9a1ca99359e077395a5 | |
parent | d19690980d4b04f39327f4c1036c776a5081be0c (diff) | |
parent | 6eba967e1c3aa7a43ef900d8f2e68f2d7867c1e2 (diff) | |
download | libevent-1f006637ecb23b09f36246e08986b3cb8fbfa562.tar.gz |
Merge branch 'build/osx-fixes'
* build/osx-fixes:
Suppress -Wmacro-redefined for htonll/ntohll in OSX
Fix -Wtautological-constant-out-of-range-compare in regress_http under OSX
-rw-r--r-- | test/regress_http.c | 3 | ||||
-rw-r--r-- | test/regress_ws.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/test/regress_http.c b/test/regress_http.c index 626908c6..1af425e3 100644 --- a/test/regress_http.c +++ b/test/regress_http.c @@ -965,7 +965,8 @@ http_custom_cb(struct evhttp_request *req, void *arg) int empty = evhttp_find_header(evhttp_request_get_input_headers(req), "Empty") != NULL; /* Expecting a CUSTOM request */ - if (evhttp_request_get_command(req) != EVHTTP_REQ_CUSTOM) { + uint32_t command = evhttp_request_get_command(req); + if (command != EVHTTP_REQ_CUSTOM) { fprintf(stdout, "FAILED (custom type)\n"); exit(1); } 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) |