Index: gnutls-3.7.1/gl/stdio.in.h
===================================================================
--- gnutls-3.7.1.orig/gl/stdio.in.h
+++ gnutls-3.7.1/gl/stdio.in.h
@@ -722,7 +722,9 @@ _GL_WARN_ON_USE (getline, "getline is un
 /* It is very rare that the developer ever has full control of stdin,
    so any use of gets warrants an unconditional warning; besides, C11
    removed it.  */
+#if defined gets
 #undef gets
+#endif
 #if HAVE_RAW_DECL_GETS && !defined __cplusplus
 _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
 #endif
