浏览代码

Fix endian.h location on FreeBSD

Po-Chuan Hsieh 4 年之前
父节点
当前提交
3172ab8ff9
共有 2 个文件被更改,包括 4 次插入0 次删除
  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