]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
libxt_string: define _GNU_SOURCE for strnlen
authorJan Engelhardt <jengelh@medozas.de>
Mon, 1 Aug 2011 18:08:42 +0000 (20:08 +0200)
committerJan Engelhardt <jengelh@medozas.de>
Mon, 1 Aug 2011 18:16:03 +0000 (20:16 +0200)
On RHEL-5.6 and clones with its gcc-4.1.2 and glibc-2.5:

libxt_string.c: In function "parse_string":
libxt_string.c:84: warning: implicit declaration of function "strnlen"

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
extensions/libxt_string.c

index eef0b081b1f541aa850e73fbf5bc7587adcf109f..8cee3359e7a15a9842fa4d96e2de0ffaf302e581 100644 (file)
@@ -20,6 +20,7 @@
  *             updated to work with slightly modified
  *             ipt_string_info.
  */
+#define _GNU_SOURCE 1 /* strnlen for older glibcs */
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>