]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
hurd: Do not include full <stdarg.h> in <hurd.h>
authorFlorian Weimer <fweimer@redhat.com>
Mon, 31 Jul 2023 10:38:12 +0000 (12:38 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Thu, 3 Aug 2023 08:25:52 +0000 (10:25 +0200)
This fixes a hurd/check-installed-headers-c failure with
-std=c89 #define _FORTIFY_SOURCE 1:

In file included from ../hurd/hurd.h:354,
                 from ../sysdeps/hurd/include/hurd.h:2,
                 from /tmp/cih_test_9IaUwa.c:10:
/home/bmg/install/compilers/i686-gnu/lib/gcc/i686-glibc-gnu/13.2.1/include/stdarg.h:54:34: error: "__STDC_VERSION__" is not defined, evaluates to 0 [-Werror=undef]
   54 | #if !defined(__STRICT_ANSI__) || __STDC_VERSION__ + 0 >= 199900L \
      |                                  ^~~~~~~~~~~~~~~~
/home/bmg/install/compilers/i686-gnu/lib/gcc/i686-glibc-gnu/13.2.1/include/stdarg.h:55:8: error: "__cplusplus" is not defined, evaluates to 0 [-Werror=undef]
   55 |     || __cplusplus + 0 >= 201103L
      |        ^~~~~~~~~~~
cc1: all warnings being treated as errors

Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
hurd/hurd.h

index 06f00e93d67bcd61c1339fdfb80fa1e8d1a72216..a38e6656766cdf342924f78ab2ba51b636d283ae 100644 (file)
@@ -350,12 +350,12 @@ extern int hurd_check_cancel (void);
 
 extern io_t __getdport (int fd), getdport (int fd);
 
-
+#define __need___va_list
 #include <stdarg.h>
 
 /* Write formatted output to PORT, a Mach port supporting the i/o protocol,
    according to the format string FORMAT, using the argument list in ARG.  */
-int vpprintf (io_t port, const char *format, va_list arg);
+int vpprintf (io_t port, const char *format, __gnuc_va_list arg);
 
 
 #endif /* hurd.h */