[glibc] testsuite: fix test-narrowing-trap failure on platforms where FE_INVALID is not defined

Adhemerval Zanella via Glibc-cvs <[email protected]>
Newsgroups gmane.comp.lib.glibc.cvs
Message-ID <[email protected]>
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=7cc1f7683ba87a5f7f64900df9e62b495c83ac07

commit 7cc1f7683ba87a5f7f64900df9e62b495c83ac07
Author: Xi Ruoyao <[email protected]>
Date:   Thu Mar 26 18:54:08 2026 +0800

    testsuite: fix test-narrowing-trap failure on platforms where FE_INVALID is not defined
    
    I didn't realize it can be undefined at all instead of simply
    unsupported :(.
    
    Signed-off-by: Xi Ruoyao <[email protected]>
    Reviewed-by: Adhemerval Zanella  <[email protected]>

Diff:
---
 math/test-narrowing-trap.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/math/test-narrowing-trap.c b/math/test-narrowing-trap.c
index a483c4bf1a..6d21357913 100644
--- a/math/test-narrowing-trap.c
+++ b/math/test-narrowing-trap.c
@@ -26,6 +26,7 @@
 static int
 do_test (void)
 {
+#ifdef FE_INVALID
   pid_t pid;
 
   if (!EXCEPTION_ENABLE_SUPPORTED (FE_INVALID))
@@ -50,6 +51,9 @@ do_test (void)
     }
 
   return 0;
+#else
+  FAIL_UNSUPPORTED ("FE_INVALID is not defined");
+#endif
 }
 
 #include <support/test-driver.c>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.