diff --git a/emacs-24.1-gets.patch b/emacs-24.1-gets.patch new file mode 100644 index 0000000..fb8b52a --- /dev/null +++ b/emacs-24.1-gets.patch @@ -0,0 +1,13 @@ +--- emacs-24.1/lib/stdio.in.h.old 2012-09-10 11:22:57.405938628 +0200 ++++ emacs-24.1/lib/stdio.in.h 2012-09-10 11:24:01.071262324 +0200 +@@ -715,8 +715,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 HAVE_RAW_DECL_GETS + _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); + #endif ++#endif + + + #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@ diff --git a/emacs.changes b/emacs.changes index 621a8dd..95a70d1 100644 --- a/emacs.changes +++ b/emacs.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Sep 10 09:25:05 UTC 2012 - aj@suse.de + +- Add emacs-24.1-gets.patch to check whether gets is declared + before warning about it (needed by glibc 2.16). + ------------------------------------------------------------------- Thu Jul 26 07:39:27 UTC 2012 - werner@suse.de diff --git a/emacs.spec b/emacs.spec index e365307..b606b50 100644 --- a/emacs.spec +++ b/emacs.spec @@ -95,6 +95,7 @@ Patch16: emacs-23.1-flyspell.patch Patch22: emacs-24.1-bnc628268.patch Patch23: emacs-24.1-xevent.patch Patch24: emacs-24.1-xgselect.patch +Patch25: emacs-24.1-gets.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %global bug_345669 0 %{expand: %%global _exec_prefix %(type -p pkg-config &>/dev/null && pkg-config --variable prefix x11 || echo /usr/X11R6)} @@ -203,6 +204,7 @@ fi %patch22 %patch23 %patch24 +%patch25 -p1 %if 0%{?suse_version} < 1130 %patch1 %endif