diff --git a/getext-stdio.in.patch b/getext-stdio.in.patch
new file mode 100644
index 0000000..f349484
--- /dev/null
+++ b/getext-stdio.in.patch
@@ -0,0 +1,42 @@
+Index: gettext-0.18.1.1/gettext-runtime/gnulib-lib/stdio.in.h
+===================================================================
+--- gettext-0.18.1.1.orig/gettext-runtime/gnulib-lib/stdio.in.h
++++ gettext-0.18.1.1/gettext-runtime/gnulib-lib/stdio.in.h
+@@ -141,7 +141,9 @@ _GL_WARN_ON_USE (fflush, "fflush is not
+    so any use of gets warrants an unconditional warning.  Assume it is
+    always declared, since it is required by C89.  */
+ #undef gets
++#if HAVE_RAW_DECL_GETS
+ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
++#endif
+ 
+ #if @GNULIB_FOPEN@
+ # if @REPLACE_FOPEN@
+Index: gettext-0.18.1.1/gettext-tools/gnulib-lib/stdio.in.h
+===================================================================
+--- gettext-0.18.1.1.orig/gettext-tools/gnulib-lib/stdio.in.h
++++ gettext-0.18.1.1/gettext-tools/gnulib-lib/stdio.in.h
+@@ -141,7 +141,9 @@ _GL_WARN_ON_USE (fflush, "fflush is not
+    so any use of gets warrants an unconditional warning.  Assume it is
+    always declared, since it is required by C89.  */
+ #undef gets
++#if HAVE_RAW_DECL_GETS
+ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
++#endif
+ 
+ #if @GNULIB_FOPEN@
+ # if @REPLACE_FOPEN@
+Index: gettext-0.18.1.1/gettext-tools/libgettextpo/stdio.in.h
+===================================================================
+--- gettext-0.18.1.1.orig/gettext-tools/libgettextpo/stdio.in.h
++++ gettext-0.18.1.1/gettext-tools/libgettextpo/stdio.in.h
+@@ -141,7 +141,9 @@ _GL_WARN_ON_USE (fflush, "fflush is not
+    so any use of gets warrants an unconditional warning.  Assume it is
+    always declared, since it is required by C89.  */
+ #undef gets
++#if HAVE_RAW_DECL_GETS
+ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
++#endif
+ 
+ #if @GNULIB_FOPEN@
+ # if @REPLACE_FOPEN@
diff --git a/gettext-csharp.changes b/gettext-csharp.changes
index f68ee85..bf73ea8 100644
--- a/gettext-csharp.changes
+++ b/gettext-csharp.changes
@@ -1,3 +1,8 @@
+-------------------------------------------------------------------
+Sun Jul 22 18:41:30 UTC 2012 - aj@suse.de
+
+- Fix build with missing gets declaration (glibc 2.16)
+
 -------------------------------------------------------------------
 Tue Dec 21 13:43:49 CET 2010 - pth@suse.de
 
diff --git a/gettext-csharp.spec b/gettext-csharp.spec
index 4db0c76..fc67466 100644
--- a/gettext-csharp.spec
+++ b/gettext-csharp.spec
@@ -43,6 +43,7 @@ Patch5:         gettext-initialize_vars.patch
 Patch6:         gettext-0.15-docdir.diff
 Patch7:         gettext-autotools.patch
 Patch9:         gettext-needlessly_init_vars.patch
+Patch10:        getext-stdio.in.patch
 
 %description
 Mono with its 'resgen' program uses a design that Microsoft created and
@@ -81,6 +82,7 @@ Authors:
 %patch6
 %patch7
 %patch9
+%patch10 -p1
 
 %build
 export CFLAGS="%{optflags} -pipe -W -Wall -Dgcc_is_lint"
diff --git a/gettext-java.changes b/gettext-java.changes
index b7ab6eb..c25d0f0 100644
--- a/gettext-java.changes
+++ b/gettext-java.changes
@@ -1,3 +1,8 @@
+-------------------------------------------------------------------
+Sun Jul 22 18:41:35 UTC 2012 - aj@suse.de
+
+- Fix build with missing gets declaration (glibc 2.16)
+
 -------------------------------------------------------------------
 Tue Dec 21 13:43:49 CET 2010 - pth@suse.de
 
diff --git a/gettext-java.spec b/gettext-java.spec
index c4db7fb..1ad6cac 100644
--- a/gettext-java.spec
+++ b/gettext-java.spec
@@ -43,6 +43,7 @@ Patch5:         gettext-initialize_vars.patch
 Patch6:         gettext-0.15-docdir.diff
 Patch7:         gettext-autotools.patch
 Patch9:         gettext-needlessly_init_vars.patch
+Patch10:        getext-stdio.in.patch
 
 %description
 This package includes the tools needed to support message catalogs in
@@ -59,6 +60,7 @@ java+swing.
 %patch6
 %patch7
 %patch9
+%patch10 -p1
 
 %build
 export CFLAGS="%{optflags} -pipe -W -Wall -Dgcc_is_lint"
diff --git a/gettext-runtime.changes b/gettext-runtime.changes
index eb89e5e..3d42665 100644
--- a/gettext-runtime.changes
+++ b/gettext-runtime.changes
@@ -1,3 +1,8 @@
+-------------------------------------------------------------------
+Sun Jul 22 18:41:39 UTC 2012 - aj@suse.de
+
+- Fix build with missing gets declaration (glibc 2.16)
+
 -------------------------------------------------------------------
 Mon Jul  2 11:04:21 UTC 2012 - coolo@suse.com
 
diff --git a/gettext-runtime.spec b/gettext-runtime.spec
index 35acd0f..448505b 100644
--- a/gettext-runtime.spec
+++ b/gettext-runtime.spec
@@ -54,6 +54,7 @@ Patch5:         gettext-initialize_vars.patch
 Patch6:         gettext-0.15-docdir.diff
 Patch7:         gettext-autotools.patch
 Patch9:         gettext-needlessly_init_vars.patch
+Patch10:        getext-stdio.in.patch
 
 %description
 This package contains the intl library as well as tools that ease the
@@ -95,6 +96,7 @@ binary catalogs.
 %patch6
 %patch7
 %patch9
+%patch10 -p1
 
 %build
 # expect a couple "You should update your `aclocal.m4' by running aclocal."