Explorar o código

Fix endian.h location on FreeBSD

Po-Chuan Hsieh %!s(int64=4) %!d(string=hai) anos
pai
achega
3172ab8ff9
Modificáronse 2 ficheiros con 4 adicións e 0 borrados
  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