[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [libvirt] gnulib tests in libvirt broken by newer glibc 2.26
From: |
Bruno Haible |
Subject: |
Re: [libvirt] gnulib tests in libvirt broken by newer glibc 2.26 |
Date: |
Mon, 09 Oct 2017 16:34:26 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-96-generic; KDE/5.18.0; x86_64; ; ) |
Daniel P. Berrange wrote:
> Tested-by: Daniel P. Berrange <address@hidden>
>
>
> Confirmed it fixes the failure on Fedora 28, and does not cause a regression
> on Fedora 26 with older glibc.
Thanks. Pushing it:
2017-10-09 Bruno Haible <address@hidden>
getopt-posix: Fix build failure when using ac_cv_header_getopt_h=no.
Reported by Christian Ehrhardt <address@hidden>
and Daniel P. Berrange <address@hidden>.
* lib/unistd.in.h (getopt): Don't attempt to avoid namespace pollution
on glibc systems. The getopt-pfx-core.h file declares exactly what
unistd.h needs, nothing more.
diff --git a/lib/unistd.in.h b/lib/unistd.in.h
index 748112f..b5b6e0e 100644
--- a/lib/unistd.in.h
+++ b/lib/unistd.in.h
@@ -134,9 +134,8 @@
/* The definition of _GL_WARN_ON_USE is copied here. */
-/* Get getopt(), optarg, optind, opterr, optopt.
- But avoid namespace pollution on glibc systems. */
-#if @GNULIB_UNISTD_H_GETOPT@ && !defined __GLIBC__ && !defined
_GL_SYSTEM_GETOPT
+/* Get getopt(), optarg, optind, opterr, optopt. */
+#if @GNULIB_UNISTD_H_GETOPT@ && !defined _GL_SYSTEM_GETOPT
# include <getopt-cdefs.h>
# include <getopt-pfx-core.h>
#endif