]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
iptables: include sys/time.h to fix lack of struct timeval declaration
authorMaciej Żenczykowski <maze@google.com>
Tue, 21 Apr 2020 08:15:34 +0000 (01:15 -0700)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 28 Apr 2020 00:08:24 +0000 (02:08 +0200)
This fixes clang compiler warnings:

iptables/xshared.h:176:50: error: declaration of 'struct timeval' will not be visible outside of this function [-Werror,-Wvisibility]
extern int xtables_lock_or_exit(int wait, struct timeval *tv);
                                                 ^
iptables/xshared.h:179:57: error: declaration of 'struct timeval' will not be visible outside of this function [-Werror,-Wvisibility]
void parse_wait_interval(int argc, char *argv[], struct timeval *wait_interval);
                                                        ^

Test: builds with less warnings
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
iptables/xshared.h

index 490b19ade510679b185957f281912a7f616b48ca..c41bd054bf36f991523ea33e7a6ac0ad41a2b0cb 100644 (file)
@@ -6,6 +6,7 @@
 #include <stdint.h>
 #include <netinet/in.h>
 #include <net/if.h>
+#include <sys/time.h>
 #include <linux/netfilter_arp/arp_tables.h>
 #include <linux/netfilter_ipv4/ip_tables.h>
 #include <linux/netfilter_ipv6/ip6_tables.h>