patch out _GL_WARN_ON_USE

This commit is contained in:
Jan Wagner 2013-06-24 16:20:15 +00:00
parent 11f0f73ade
commit 129ccbb3d4
3 changed files with 37 additions and 0 deletions

1
debian/changelog vendored
View file

@ -8,6 +8,7 @@ nagios-plugins (1.4.16-2) UNRELEASED; urgency=low
- Closes: #713839, thanks to Russell Sim
* Enable Extra-Opts by adding --enable-extra-opts to configure flags
(Closes: #698119)
* Fix FTBFS: do not assume that gets is defined (LP: #1097848).
-- Jan Wagner <waja@cyconet.org> Wed, 27 Jun 2012 23:14:40 +0200

View file

@ -1,2 +1,4 @@
02_check_icmp_links.dpatch
05_fix_gets_undefined_in_iso_c11.dpatch
# commited upstream

View file

@ -0,0 +1,34 @@
#! /bin/sh /usr/share/dpatch/dpatch-run
## 17_fix_gets_undefined_in_iso_c11.dpatch by <ubuntu@server-e76384a2-51cb-4595-9b66-9ed53c1e0c44.canonistack>
##
## All lines beginning with `## DP:' are a description of the patch.
##
## DP: Do not assume that gets is defined. gets got dropped in ISO C11,
## DP: but the embedded old version of gnulib assumes it is defined. Since Ubuntu
## DP: now does not define gets, it is safe to disable this warning, which fixes the
## DP: FTBFS.
## DP:
## DP: Author: Robie Basak <robie.basak@canonical.com>
## DP: Bug: http://sourceforge.net/support/tracker.php?aid=3600122
## DP: Bug-Ubuntu: https://launchpad.net/bugs/1097848
@DPATCH@
diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' nagios-plugins-1.4.15~/gl/stdio.in.h nagios-plugins-1.4.15/gl/stdio.in.h
--- nagios-plugins-1.4.15~/gl/stdio.in.h 2010-07-27 20:47:15.000000000 +0000
+++ nagios-plugins-1.4.15/gl/stdio.in.h 2013-01-09 17:17:13.112864259 +0000
@@ -141,7 +141,14 @@
so any use of gets warrants an unconditional warning. Assume it is
always declared, since it is required by C89. */
#undef gets
-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+
+/* gets is no longer defined in ISO C11. This has been updated in upstream
+ * gnulib:
+ * http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=66712c23388e93e5c518ebc8515140fa0c807348
+ * Since Ubuntu now does not define gets, it is safe to disable this warning.
+ * https://launchpad.net/bugs/1097848
+ * _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+ */
#if @GNULIB_FOPEN@
# if @REPLACE_FOPEN@