af-list,arphrd-list: also include relevant missing_*.h headers

This commit is contained in:
Yu Watanabe 2018-12-06 17:42:21 +01:00
parent 18bf324ab5
commit 0b7d48f5f4
5 changed files with 8 additions and 5 deletions

View File

@ -6,6 +6,7 @@
#include "arphrd-list.h"
#include "macro.h"
#include "missing_network.h"
static const struct arphrd_name* lookup_arphrd(register const char *str, register GPERF_LEN_TYPE len);

View File

@ -1,6 +1,6 @@
#!/bin/sh
set -eu
$1 -E -dM -include sys/socket.h - </dev/null | \
$1 -E -dM -include sys/socket.h -include "$2" -include "$3" - </dev/null | \
grep -Ev 'AF_UNSPEC|AF_MAX' | \
awk '/^#define[ \t]+AF_[^ \t]+[ \t]+[AP]F_[^ \t]/ { print $2; }'

View File

@ -1,6 +1,6 @@
#!/bin/sh
set -eu
$1 -dM -include net/if_arp.h - </dev/null | \
$1 -dM -include net/if_arp.h -include "$2" -include "$3" - </dev/null | \
awk '/^#define[ \t]+ARPHRD_[^ \t]+[ \t]+[^ \t]/ { print $2; }' | \
sed -e 's/ARPHRD_//'

View File

@ -212,19 +212,21 @@ basic_sources = files('''
missing_audit_h = files('missing_audit.h')
missing_capability_h = files('missing_capability.h')
missing_network_h = files('missing_network.h')
missing_socket_h = files('missing_socket.h')
generate_af_list = find_program('generate-af-list.sh')
af_list_txt = custom_target(
'af-list.txt',
output : 'af-list.txt',
command : [generate_af_list, cpp],
command : [generate_af_list, cpp, config_h, missing_socket_h],
capture : true)
generate_arphrd_list = find_program('generate-arphrd-list.sh')
arphrd_list_txt = custom_target(
'arphrd-list.txt',
output : 'arphrd-list.txt',
command : [generate_arphrd_list, cpp],
command : [generate_arphrd_list, cpp, config_h, missing_network_h],
capture : true)
generate_cap_list = find_program('generate-cap-list.sh')

View File

@ -4,8 +4,8 @@
#include <string.h>
#include "macro.h"
#include "missing_network.h"
#include "string-util.h"
#include "util.h"
_unused_ \
static const struct arphrd_name* lookup_arphrd(register const char *str, register GPERF_LEN_TYPE len);