Skip to content

Commit 1aa3893

Browse files
committed
Fixing build error for iOS tests.
1 parent a2d5d7e commit 1aa3893

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Release/tests/functional/websockets/utilities/test_websocket_server.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,23 @@
5252
#endif
5353
#endif /* _WIN32 */
5454

55+
#if defined(__APPLE__)
56+
#include "stdlib.h"
57+
// Issue caused by iOS SDK 8.0
58+
#pragma push_macro("ntohll")
59+
#pragma push_macro("htonll")
60+
#undef ntohll
61+
#undef htonll
62+
#endif
63+
5564
#include <websocketpp/config/asio_no_tls.hpp>
5665
#include <websocketpp/server.hpp>
5766

67+
#if defined(__APPLE__)
68+
#pragma pop_macro("htonll")
69+
#pragma pop_macro("ntohll")
70+
#endif
71+
5872
#ifdef _WIN32
5973
#pragma warning( pop )
6074
#endif

0 commit comments

Comments
 (0)