Commit a5faf17090b031b49bb8105d77b7f8b9f1ad671d

Guillem Jover 2023-04-01T12:46:49

Only use <stdio_ext.h> if present

diff --git a/configure.ac b/configure.ac
index 4a3c8b0..7588a3b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -173,6 +173,7 @@ AC_CHECK_HEADERS([\
   dirent.h \
   pwd.h \
   grp.h \
+  stdio_ext.h \
 ])
 
 # Checks for typedefs, structures, and compiler characteristics.
diff --git a/src/fpurge.c b/src/fpurge.c
index 350f364..4a20c51 100644
--- a/src/fpurge.c
+++ b/src/fpurge.c
@@ -26,7 +26,9 @@
 
 #include <errno.h>
 #include <stdio.h>
+#if HAVE_STDIO_EXT_H
 #include <stdio_ext.h>
+#endif
 
 #ifdef HAVE___FPURGE
 int