diff --git a/lib/libc/tests/stdlib/Makefile b/lib/libc/tests/stdlib/Makefile index 4a08f8557d08..23e899608fd4 100644 --- a/lib/libc/tests/stdlib/Makefile +++ b/lib/libc/tests/stdlib/Makefile @@ -14,6 +14,9 @@ ATF_TESTS_CXX+= cxa_thread_atexit_test ATF_TESTS_CXX+= cxa_thread_atexit_nothr_test .endif +# All architectures on FreeBSD have fenv.h +CFLAGS+= -D__HAVE_FENV + # Not sure why this isn't defined for all architectures, since most # have long double. .if ${MACHINE_CPUARCH} == "aarch64" || \ diff --git a/lib/msun/tests/Makefile b/lib/msun/tests/Makefile index 949b0a5b7aad..6c8cee976173 100644 --- a/lib/msun/tests/Makefile +++ b/lib/msun/tests/Makefile @@ -99,6 +99,8 @@ ARCH_SUBDIR= ${MACHINE_CPUARCH} # precision is. CFLAGS+= -DLDBL_PREC=${LDBL_PREC} +CFLAGS.fe_round_test+= -D__HAVE_FENV + .include .include