aboutgitcodebugslistschat
path: root/conf.c
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2021-10-21 04:26:08 +0200
committerStefano Brivio <sbrivio@redhat.com>2021-10-21 04:26:08 +0200
commitdd942eaa480a0744fd64844f34233900a0da6893 (patch)
tree42f048af444890506e208d0058c5cd3e03718667 /conf.c
parent6257a2752e39c55bfb03d6db94af0c6033feb8df (diff)
downloadpasst-dd942eaa480a0744fd64844f34233900a0da6893.tar
passt-dd942eaa480a0744fd64844f34233900a0da6893.tar.gz
passt-dd942eaa480a0744fd64844f34233900a0da6893.tar.bz2
passt-dd942eaa480a0744fd64844f34233900a0da6893.tar.lz
passt-dd942eaa480a0744fd64844f34233900a0da6893.tar.xz
passt-dd942eaa480a0744fd64844f34233900a0da6893.tar.zst
passt-dd942eaa480a0744fd64844f34233900a0da6893.zip
passt: Fix build with gcc 7, use std=c99, enable some more Clang checkers
Unions and structs, you all have names now. Take the chance to enable bugprone-reserved-identifier, cert-dcl37-c, and cert-dcl51-cpp checkers in clang-tidy. Provide a ffsl() weak declaration using gcc built-in. Start reordering includes, but that's not enough for the llvm-include-order checker yet. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'conf.c')
-rw-r--r--conf.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/conf.c b/conf.c
index 13d3dc6..7dd213d 100644
--- a/conf.c
+++ b/conf.c
@@ -14,32 +14,30 @@
* #syscalls stat
*/
-#define _GNU_SOURCE
-#include <sched.h>
+#include <arpa/inet.h>
+#include <errno.h>
+#include <fcntl.h>
#include <getopt.h>
#include <string.h>
-#include <errno.h>
+#include <sched.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include <fcntl.h>
-#include <ifaddrs.h>
#include <limits.h>
#include <stdlib.h>
#include <stdint.h>
#include <unistd.h>
#include <syslog.h>
#include <time.h>
-#include <arpa/inet.h>
#include <netinet/in.h>
-#include <linux/if_ether.h>
-#include <linux/netlink.h>
-#include <linux/rtnetlink.h>
+#include <netinet/if_ether.h>
+
+#include <linux/ipv6.h>
#include "util.h"
#include "passt.h"
+#include "netlink.h"
#include "udp.h"
#include "tcp.h"
-#include "netlink.h"
#include "pasta.h"
/**