gettext fails to build on CentOS-7

gcc -static-libgcc -fPIC -DHAVE_CONFIG_H -DEXEEXT=\"\" -I. -I..  -I../intl -I../intl -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1 -I/root/relocatable-python/dist/include  -I/root/relocatable-python/dist/include -c -o closeout.o closeout.c
In file included from closeout.c:22:0:
./stdio.h:456:1: error: ‘gets’ undeclared here (not in a function)
 _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
libgnutls fails to build on CentOS-7

make[6]: Entering directory `/root/relocatable-python/parts/libgnutls__compile__/gnutls-2.12.3/lib/gl'
  CC     c-ctype.lo
  CC     close-hook.lo
  CC     sockets.lo
  CC     asnprintf.lo
  CC     printf-args.lo
  CC     printf-parse.lo
  CC     read-file.lo
In file included from read-file.h:26:0,
                 from read-file.c:21:
./stdio.h:477:1: error: 'gets' undeclared here (not in a function)
 _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");