Browse Source

Fix endian.h location on FreeBSD

Po-Chuan Hsieh 4 năm trước cách đây
mục cha
commit
3172ab8ff9
2 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 2 0
      src/google/protobuf/io/coded_stream.h
  2. 2 0
      src/google/protobuf/stubs/port.h

+ 2 - 0
src/google/protobuf/io/coded_stream.h

@@ -133,6 +133,8 @@
 #else
 #ifdef __APPLE__
 #include <machine/endian.h>  // __BYTE_ORDER
+#elif defined(__FreeBSD__)
+#include <sys/endian.h>  // __BYTE_ORDER
 #else
 #include <endian.h>  // __BYTE_ORDER
 #endif

+ 2 - 0
src/google/protobuf/stubs/port.h

@@ -59,6 +59,8 @@
 #else
 #ifdef __APPLE__
 #include <machine/endian.h>  // __BYTE_ORDER
+#elif defined(__FreeBSD__)
+#include <sys/endian.h>  // __BYTE_ORDER
 #else
 #include <endian.h>  // __BYTE_ORDER
 #endif