1
0
Fork 0
mirror of https://passt.top/passt synced 2025-06-11 10:05:34 +02:00

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>
This commit is contained in:
Stefano Brivio 2021-10-21 04:26:08 +02:00
parent 6257a2752e
commit dd942eaa48
24 changed files with 300 additions and 284 deletions

3
util.h
View file

@ -136,9 +136,7 @@ enum {
#define SNDBUF_BIG (4 * 1024 * 1024)
#define SNDBUF_SMALL (128 * 1024)
#include <linux/ipv6.h>
#include <net/if.h>
#include <linux/ip.h>
#include <limits.h>
#include <stdarg.h>
@ -151,6 +149,7 @@ enum bind_type {
struct ctx;
__attribute__ ((weak)) int ffsl(long int i) { return __builtin_ffsl(i); }
void __openlog(const char *ident, int option, int facility);
void passt_vsyslog(int pri, const char *format, va_list ap);
void __setlogmask(int mask);