diff --git a/ortools/util/fp_utils.h b/ortools/util/fp_utils.h index 2a943040d9..d0a3e20fc1 100644 --- a/ortools/util/fp_utils.h +++ b/ortools/util/fp_utils.h @@ -89,7 +89,7 @@ class ScopedFloatingPointEnv { excepts &= FE_ALL_EXCEPT; #if defined(__APPLE__) fenv_.__control &= ~excepts; -#elif defined(__FreeBSD__) +#elif (defined(__FreeBSD__) || defined(__OpenBSD__)) fenv_.__x87.__control &= ~excepts; #else // Linux fenv_.__control_word &= ~excepts;