awwit/httpserver

error occurred when make this project

xiangpdu opened this issue · 1 comments

Make failed on mac os x.
Error message as blow:

c++ -DPOSIX -std=c++14 -c -Wall -O2 src/transfer/FileIncoming.cpp -o build/obj/transfer/FileIncoming.o
c++ -DPOSIX -std=c++14 -c -Wall -O2 src/transfer/http2/HPack.cpp -o build/obj/transfer/http2/HPack.o
c++ -DPOSIX -std=c++14 -c -Wall -O2 src/transfer/http2/Http2.cpp -o build/obj/transfer/http2/Http2.o
src/transfer/http2/Http2.cpp:174:47: error: expected unqualified-id
*reinterpret_cast<uint32_t *>(addr + 5) = ::htonl(this->stream_id);
^
/usr/include/sys/_endian.h:136:18: note: expanded from macro 'htonl'
#define htonl(x) __DARWIN_OSSwapInt32(x)
^
/usr/include/libkern/_OSByteOrder.h:75:5: note: expanded from macro '__DARWIN_OSSwapInt32'
(__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt32(x) : _OSSwapInt32(x))
^
src/transfer/http2/Http2.cpp:233:47: error: expected unqualified-id
*reinterpret_cast<uint32_t *>(addr + 5) = ::htonl(this->stream_id);
^
/usr/include/sys/_endian.h:136:18: note: expanded from macro 'htonl'
#define htonl(x) __DARWIN_OSSwapInt32(x)
^
/usr/include/libkern/_OSByteOrder.h:75:5: note: expanded from macro '__DARWIN_OSSwapInt32'
(__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt32(x) : _OSSwapInt32(x))
^
2 errors generated.
make: *** [build/obj/transfer/http2/Http2.o] Error 1

Close it as it seems doesn't support on mac os x.