xshared.h - include sys/time.h to fix lack of struct timeval declaration
Subsystems (3)
PATCH 1/1 xshared.h - include sys/time.h to fix lack of struct timeval declaration
From: Maciej Żenczykowski <[email protected]>
This fixes 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 <[email protected]>
--- iptables/xshared.h | 1 + 1 file changed, 1 insertion(+)
iptables/xshared.h +1 -0
@@ -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>
Signature · 1 line
2.26.1.301.g55bc3eb7cb9-goog
Quoted 10 lines · Maciej Żenczykowski
From: Maciej Żenczykowski <[email protected]>
This fixes compiler warnings:
iptables/xshared.h:176:50: error: declaration of 'struct timeval' will not be visible outside of this function [-Werror,-Wvisibility] extern intxtables_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); ^
Applied.