aboutsummaryrefslogtreecommitdiff
path: root/stdio-common
diff options
context:
space:
mode:
Diffstat (limited to 'stdio-common')
-rw-r--r--stdio-common/Makefile3
-rw-r--r--stdio-common/tst-gets.c5
2 files changed, 8 insertions, 0 deletions
diff --git a/stdio-common/Makefile b/stdio-common/Makefile
index f693fa0..01a6dd0 100644
--- a/stdio-common/Makefile
+++ b/stdio-common/Makefile
@@ -141,6 +141,9 @@ CFLAGS-scanf15.c = -I../libio -I../stdlib -I../wcsmbs -I../time -I../string \
CFLAGS-scanf17.c = -I../libio -I../stdlib -I../wcsmbs -I../time -I../string \
-I../wctype
+# tst-gets.c tests a deprecated function.
+CFLAGS-tst-gets.c += -Wno-deprecated-declarations
+
CPPFLAGS += $(libio-mtsafe)
$(objpfx)tst-setvbuf1.out: /dev/null $(objpfx)tst-setvbuf1
diff --git a/stdio-common/tst-gets.c b/stdio-common/tst-gets.c
index 102f235..9340c76 100644
--- a/stdio-common/tst-gets.c
+++ b/stdio-common/tst-gets.c
@@ -17,6 +17,11 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+/* This file tests gets. Force it to be declared. */
+#include <features.h>
+#undef __GLIBC_USE_DEPRECATED_GETS
+#define __GLIBC_USE_DEPRECATED_GETS 1
+
#include <stdio.h>
#include <string.h>