From 180a0d70d117a9da652fa1aa17fff9537b082c2c Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 9 Oct 2017 16:33:00 +0200 Subject: [PATCH] getopt-posix: Fix build failure when using ac_cv_header_getopt_h=no. Reported by Christian Ehrhardt and Daniel P. Berrange . * 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. --- ChangeLog | 9 +++++++++ lib/unistd.in.h | 5 ++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 85cc398f9a..2adb915a0f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2017-10-09 Bruno Haible + + getopt-posix: Fix build failure when using ac_cv_header_getopt_h=no. + Reported by Christian Ehrhardt + and Daniel P. Berrange . + * 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. + 2017-10-08 Bruno Haible vma-iter: Improve support for FreeBSD. diff --git a/lib/unistd.in.h b/lib/unistd.in.h index 748112f382..b5b6e0e9c6 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 # include #endif -- 2.39.5