diff options
Diffstat (limited to 'stdio-common')
-rw-r--r-- | stdio-common/Makefile | 3 | ||||
-rw-r--r-- | stdio-common/tst-gets.c | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/stdio-common/Makefile b/stdio-common/Makefile index f693fa001f..01a6dd0eda 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 102f235e53..9340c76f8a 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> |