[nagios-plugins] * glibc 2.16 no longer defines gets for ISO C11, ISO C++11, and _GNU_SOURCE

Jose Pedro Oliveira jpo at fedoraproject.org
Wed Jun 27 09:02:19 UTC 2012


commit 0fba9c19ff8fcf83c76db87960dd209c6da0c60b
Author: Jose Pedro Oliveira <jpo at di.uminho.pt>
Date:   Wed Jun 27 11:02:01 2012 +0100

     * glibc 2.16 no longer defines gets for ISO C11, ISO C++11, and _GNU_SOURCE

 ...os-plugins-0007-undef-gets-and-glibc-2.16.patch |   14 ++++++++++++++
 nagios-plugins.spec                                |    8 +++++++-
 2 files changed, 21 insertions(+), 1 deletions(-)
---
diff --git a/nagios-plugins-0007-undef-gets-and-glibc-2.16.patch b/nagios-plugins-0007-undef-gets-and-glibc-2.16.patch
new file mode 100644
index 0000000..b4f0f17
--- /dev/null
+++ b/nagios-plugins-0007-undef-gets-and-glibc-2.16.patch
@@ -0,0 +1,14 @@
+diff -ruN nagios-plugins-1.4.15-orig/gl/stdio.in.h nagios-plugins-1.4.15/gl/stdio.in.h
+--- nagios-plugins-1.4.15-orig/gl/stdio.in.h	2010-07-27 21:47:15.000000000 +0100
++++ nagios-plugins-1.4.15/gl/stdio.in.h	2012-06-26 21:12:47.000000000 +0100
+@@ -140,8 +140,10 @@
+ /* It is very rare that the developer ever has full control of stdin,
+    so any use of gets warrants an unconditional warning.  Assume it is
+    always declared, since it is required by C89.  */
++#if defined gets
+ #undef gets
+ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
++#endif
+ 
+ #if @GNULIB_FOPEN@
+ # if @REPLACE_FOPEN@
diff --git a/nagios-plugins.spec b/nagios-plugins.spec
index 004cb4b..d78f07d 100644
--- a/nagios-plugins.spec
+++ b/nagios-plugins.spec
@@ -1,6 +1,6 @@
 Name: nagios-plugins
 Version: 1.4.15
-Release: 6%{?dist}
+Release: 7%{?dist}
 Summary: Host/service/network monitoring program plugins for Nagios
 
 Group: Applications/System
@@ -16,6 +16,7 @@ Patch4: nagios-plugins-0004-Fedora-specific-patch-for-not-to-fixing-fully-qualif
 Patch5: nagios-plugins-0005-Patch-for-check_linux_raid-with-on-linear-raid0-arra.patch
 # https://bugzilla.redhat.com/512559
 Patch6: nagios-plugins-0006-Prevent-check_swap-from-returning-OK-if-no-swap-acti.patch
+Patch7: nagios-plugins-0007-undef-gets-and-glibc-2.16.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -536,6 +537,7 @@ Provides check_wave support for Nagios.
 %patch4 -p1 -b .no_need_fo_fix_paths
 %patch5 -p1 -b .fix_linear_raid
 %patch6 -p1 -b .fix_missing_swap
+%patch7 -p1 -b .gets
 
 %build
 %configure \
@@ -833,6 +835,10 @@ rm -rf %{buildroot}
 %{_libdir}/nagios/plugins/check_wave
 
 %changelog
+* Tue Jun 26 2012 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.4.15-7
+- glibc 2.16 no longer defines gets for ISO C11, ISO C++11, and _GNU_SOURCE
+  (#835621): nagios-plugins-0007-undef-gets-and-glibc-2.16.patch
+
 * Tue Jun 26 2012 Jose Pedro Oliveira <jpo at di.uminho.pt> - 1.4.15-6
 - The nagios-plugins RPM no longer needs to own the /usr/lib{,64}/nagios/plugins
   directory; this directory is now owned by nagios-common (#835621)


More information about the scm-commits mailing list