[libvirt] gnulib tests in libvirt broken by newer glibc 2.26

Bruno Haible bruno at clisp.org
Mon Oct 9 14:34:26 UTC 2017


Daniel P. Berrange wrote:
> Tested-by: Daniel P. Berrange <berrange at redhat.com>
> 
> 
> 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  <bruno at clisp.org>

	getopt-posix: Fix build failure when using ac_cv_header_getopt_h=no.
	Reported by Christian Ehrhardt <christian.ehrhardt at canonical.com>
	and Daniel P. Berrange <berrange at redhat.com>.
	* 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




More information about the libvir-list mailing list