Fix FreeBSD support (Fix #2105)

This commit is contained in:
Mizux Seiha
2020-07-17 11:07:49 +02:00
parent 901800b06f
commit db874af7fe
2 changed files with 2 additions and 2 deletions

View File

@@ -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;

View File

@@ -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>