__need_FILE is only used here to ensure the system's <stdio.h> is
included, not to limit what <stdio.h> defines. Use gnulib's
_GL_ALREADY_INCLUDING_STDIO_H for that, which does not conflict with
libc uses of __need_FILE.
This matches what was already done in 2016 for freopen.c.
---
lib/fopen.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/fopen.c b/lib/fopen.c
index 4a0cab17c..252785019 100644
--- a/lib/fopen.c
+++ b/lib/fopen.c
@@ -19,12 +19,12 @@
/* If the user's config.h happens to include <stdio.h>, let it include only
the system's <stdio.h> here, so that orig_fopen doesn't recurse to
rpl_fopen. */
-#define __need_FILE
+#define _GL_ALREADY_INCLUDING_STDIO_H
#include <config.h>
/* Get the original definition of fopen. It might be defined as a macro. */
#include <stdio.h>
-#undef __need_FILE
+#undef _GL_ALREADY_INCLUDING_STDIO_H
static FILE *
orig_fopen (const char *filename, const char *mode)
--
2.28.0