From 5208bc05ce2e341ebbd4f4fd3142e381eedd4800 Mon Sep 17 00:00:00 2001 From: Daniel Bertalan Date: Mon, 5 Jul 2021 20:18:12 +0200 Subject: [PATCH] LibC: Don't include `fenv.h` from `float.h` This fixes a build issue where `compiler-rt` tried to declare its own version of the `FE_*` macros, and included `float.h` in order to get the constants. `compiler-rt` tried to declare these as an enum, and failed with a syntax error when the constant's literal values were substituted. --- Userland/Libraries/LibC/float.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Userland/Libraries/LibC/float.h b/Userland/Libraries/LibC/float.h index 263ada51f9..086f38a405 100644 --- a/Userland/Libraries/LibC/float.h +++ b/Userland/Libraries/LibC/float.h @@ -7,7 +7,8 @@ #pragma once -#include +// Defined in fenv.cpp, but we must not include fenv.h, so here's its prototype. +int fgetround(); #define FLT_RADIX 2 #define DECIMAL_DIG 21