From: Frank Mehnert <[email protected]>

Clang-19 defines NAN in <float.h>. Check if NAN is already defined to
prevent a compiler warning.

Change-Id: I29ebcb2a7a0c1eade46a73074a1701ea67869128
Signed-off-by: Marcus Haehnel <[email protected]>
---
 libc/sysdeps/linux/common/bits/nan.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libc/sysdeps/linux/common/bits/nan.h 
b/libc/sysdeps/linux/common/bits/nan.h
index 00cb405f1..46cfb613f 100644
--- a/libc/sysdeps/linux/common/bits/nan.h
+++ b/libc/sysdeps/linux/common/bits/nan.h
@@ -25,7 +25,9 @@
 
 #if __GNUC_PREREQ(3,3)
 
-# define NAN   (__builtin_nanf (""))
+# ifndef NAN
+#  define NAN  (__builtin_nanf (""))
+# endif
 
 #elif defined __GNUC__
 
-- 
2.47.1

_______________________________________________
devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to