Building libssp in C11 mode shows a warning for 64bit configurations,

../../../src/libssp/gets-chk.c:62:12: warning: return makes pointer from integer
without a cast [-Wint-conversion]

Currently working around by adding a prototype in gets-chk.c, conditionally
defined by the inverted condition found in glibc's stdio.h.

Is there a better approach?

  Matthias

# DP: Declare prototype for gets in C11 mode

--- libssp/gets-chk.c
+++ libssp/gets-chk.c
@@ -51,6 +51,11 @@
 # include <string.h>
 #endif
 
+#if !(!defined __USE_ISOC11                            \
+      || (defined __cplusplus && __cplusplus <= 201103L))
+extern char *gets (char *);
+#endif
+
 extern void __chk_fail (void) __attribute__((__noreturn__));
 
 char *

Reply via email to