--- lib/stdio.in.h.orig	Sat Nov  4 16:38:18 2017
+++ lib/stdio.in.h	Sat Nov  4 16:39:04 2017
@@ -743,7 +743,7 @@
    so any use of gets warrants an unconditional warning; besides, C11
    removed it.  */
 #undef gets
-#if HAVE_RAW_DECL_GETS && !defined __cplusplus
+#if HAVE_RAW_DECL_GETS && !defined __cplusplus && !defined (__sun)
 _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
 #endif