Fix FreeBSD support (Fix #2105)
This commit is contained in:
@@ -81,7 +81,7 @@ class ScopedFloatingPointEnv {
|
||||
#elif defined(ARCH_K8)
|
||||
CHECK_EQ(0, fegetenv(&fenv_));
|
||||
excepts &= FE_ALL_EXCEPT;
|
||||
#ifdef __APPLE__
|
||||
#if defined(__APPLE__) || defined(__FreeBSD__)
|
||||
fenv_.__control &= ~excepts;
|
||||
#else // Linux
|
||||
fenv_.__control_word &= ~excepts;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#ifndef OR_TOOLS_UTIL_ZVECTOR_H_
|
||||
#define OR_TOOLS_UTIL_ZVECTOR_H_
|
||||
|
||||
#if defined(__APPLE__) && defined(__GNUC__)
|
||||
#if ( defined(__APPLE__) || defined(__FreeBSD__) ) && defined(__GNUC__)
|
||||
#include <machine/endian.h>
|
||||
#elif !defined(_MSC_VER)
|
||||
#include <endian.h>
|
||||
|
||||
Reference in New Issue
Block a user