Skip to content

Commit 01234e1

Browse files
yuwatapoettering
authored andcommitted
tree-wide: drop several missing_*.h and import relevant headers from kernel-5.0
1 parent aa46c28 commit 01234e1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+10771
-2347
lines changed

meson.build

-93
Original file line numberDiff line numberDiff line change
@@ -454,96 +454,6 @@ endforeach
454454

455455
conf.set10('WANT_LINUX_STAT_H', want_linux_stat_h)
456456

457-
foreach decl : [['ETHTOOL_LINK_MODE_10baseT_Half_BIT', 'linux/ethtool.h'],
458-
['ETHTOOL_LINK_MODE_25000baseCR_Full_BIT', 'linux/ethtool.h'],
459-
['ETHTOOL_LINK_MODE_50000baseSR2_Full_BIT', 'linux/ethtool.h'],
460-
['ETHTOOL_LINK_MODE_1000baseX_Full_BIT', 'linux/ethtool.h'],
461-
['ETHTOOL_LINK_MODE_2500baseT_Full_BIT', 'linux/ethtool.h'],
462-
['ETHTOOL_LINK_MODE_FEC_NONE_BIT', 'linux/ethtool.h'],
463-
['FRA_TUN_ID', 'linux/fib_rules.h'],
464-
['FRA_SUPPRESS_PREFIXLEN', 'linux/fib_rules.h'],
465-
['FRA_PAD', 'linux/fib_rules.h'],
466-
['FRA_L3MDEV', 'linux/fib_rules.h'],
467-
['FRA_UID_RANGE', 'linux/fib_rules.h'],
468-
['FRA_DPORT_RANGE', 'linux/fib_rules.h'],
469-
['FOU_ATTR_REMCSUM_NOPARTIAL', 'linux/fou.h'],
470-
['FOU_CMD_GET', 'linux/fou.h'],
471-
['IFA_FLAGS', 'linux/if_addr.h'],
472-
['IFLA_BRIDGE_VLAN_TUNNEL_INFO', 'linux/if_bridge.h'],
473-
['IFLA_INET6_ADDR_GEN_MODE', 'linux/if_link.h'],
474-
['IN6_ADDR_GEN_MODE_STABLE_PRIVACY', 'linux/if_link.h'],
475-
['IN6_ADDR_GEN_MODE_RANDOM', 'linux/if_link.h'],
476-
['IFLA_IPVLAN_MODE', 'linux/if_link.h'],
477-
['IPVLAN_MODE_L3S', 'linux/if_link.h'],
478-
['IFLA_IPVLAN_FLAGS', 'linux/if_link.h'],
479-
['IFLA_PHYS_PORT_ID', 'linux/if_link.h'],
480-
['IFLA_CARRIER_CHANGES', 'linux/if_link.h'],
481-
['IFLA_PHYS_SWITCH_ID', 'linux/if_link.h'],
482-
['IFLA_LINK_NETNSID', 'linux/if_link.h'],
483-
['IFLA_PHYS_PORT_NAME', 'linux/if_link.h'],
484-
['IFLA_PROTO_DOWN', 'linux/if_link.h'],
485-
['IFLA_GSO_MAX_SIZE', 'linux/if_link.h'],
486-
['IFLA_PAD', 'linux/if_link.h'],
487-
['IFLA_XDP', 'linux/if_link.h'],
488-
['IFLA_EVENT', 'linux/if_link.h'],
489-
['IFLA_IF_NETNSID', 'linux/if_link.h'],
490-
['IFLA_TARGET_NETNSID', 'linux/if_link.h'],
491-
['IFLA_NEW_IFINDEX', 'linux/if_link.h'],
492-
['IFLA_MAX_MTU', 'linux/if_link.h'],
493-
['IFLA_BOND_MODE', 'linux/if_link.h'],
494-
['IFLA_BOND_ACTIVE_SLAVE', 'linux/if_link.h'],
495-
['IFLA_BOND_AD_INFO', 'linux/if_link.h'],
496-
['IFLA_BOND_AD_ACTOR_SYSTEM', 'linux/if_link.h'],
497-
['IFLA_BOND_TLB_DYNAMIC_LB', 'linux/if_link.h'],
498-
['IFLA_VXLAN_UDP_ZERO_CSUM6_RX', 'linux/if_link.h'],
499-
['IFLA_VXLAN_REMCSUM_NOPARTIAL', 'linux/if_link.h'],
500-
['IFLA_VXLAN_COLLECT_METADATA', 'linux/if_link.h'],
501-
['IFLA_VXLAN_LABEL', 'linux/if_link.h'],
502-
['IFLA_VXLAN_GPE', 'linux/if_link.h'],
503-
['IFLA_VXLAN_TTL_INHERIT', 'linux/if_link.h'],
504-
['IFLA_GENEVE_TOS', 'linux/if_link.h'],
505-
['IFLA_GENEVE_COLLECT_METADATA', 'linux/if_link.h'],
506-
['IFLA_GENEVE_REMOTE6', 'linux/if_link.h'],
507-
['IFLA_GENEVE_UDP_ZERO_CSUM6_RX', 'linux/if_link.h'],
508-
['IFLA_GENEVE_LABEL', 'linux/if_link.h'],
509-
['IFLA_GENEVE_TTL_INHERIT', 'linux/if_link.h'],
510-
['IFLA_BR_MAX_AGE', 'linux/if_link.h'],
511-
['IFLA_BR_PRIORITY', 'linux/if_link.h'],
512-
['IFLA_BR_VLAN_PROTOCOL', 'linux/if_link.h'],
513-
['IFLA_BR_VLAN_DEFAULT_PVID', 'linux/if_link.h'],
514-
['IFLA_BR_VLAN_STATS_ENABLED', 'linux/if_link.h'],
515-
['IFLA_BR_MCAST_STATS_ENABLED', 'linux/if_link.h'],
516-
['IFLA_BR_MCAST_MLD_VERSION', 'linux/if_link.h'],
517-
['IFLA_BR_VLAN_STATS_PER_PORT', 'linux/if_link.h'],
518-
['IFLA_BRPORT_LEARNING_SYNC', 'linux/if_link.h'],
519-
['IFLA_BRPORT_PROXYARP_WIFI', 'linux/if_link.h'],
520-
['IFLA_BRPORT_MULTICAST_ROUTER', 'linux/if_link.h'],
521-
['IFLA_BRPORT_PAD', 'linux/if_link.h'],
522-
['IFLA_BRPORT_MCAST_FLOOD', 'linux/if_link.h'],
523-
['IFLA_BRPORT_VLAN_TUNNEL', 'linux/if_link.h'],
524-
['IFLA_BRPORT_BCAST_FLOOD', 'linux/if_link.h'],
525-
['IFLA_BRPORT_NEIGH_SUPPRESS', 'linux/if_link.h'],
526-
['IFLA_BRPORT_ISOLATED', 'linux/if_link.h'],
527-
['IFLA_BRPORT_BACKUP_PORT', 'linux/if_link.h'],
528-
['IFLA_VRF_TABLE', 'linux/if_link.h'],
529-
# if_tunnel.h is buggy and cannot be included on its own
530-
['IFLA_VTI_FWMARK', 'linux/if_tunnel.h', '#include <net/if.h>'],
531-
['IFLA_IPTUN_ENCAP_DPORT', 'linux/if_tunnel.h', '#include <net/if.h>'],
532-
['IFLA_IPTUN_COLLECT_METADATA', 'linux/if_tunnel.h', '#include <net/if.h>'],
533-
['IFLA_IPTUN_FWMARK', 'linux/if_tunnel.h', '#include <net/if.h>'],
534-
['IFLA_GRE_ENCAP_DPORT', 'linux/if_tunnel.h', '#include <net/if.h>'],
535-
['IFLA_GRE_COLLECT_METADATA', 'linux/if_tunnel.h', '#include <net/if.h>'],
536-
['IFLA_GRE_IGNORE_DF', 'linux/if_tunnel.h', '#include <net/if.h>'],
537-
['IFLA_GRE_FWMARK', 'linux/if_tunnel.h', '#include <net/if.h>'],
538-
['IFLA_GRE_ERSPAN_INDEX', 'linux/if_tunnel.h', '#include <net/if.h>'],
539-
['IFLA_GRE_ERSPAN_HWID', 'linux/if_tunnel.h', '#include <net/if.h>'],
540-
['LO_FLAGS_PARTSCAN', 'linux/loop.h'],
541-
]
542-
prefix = decl.length() > 2 ? decl[2] : ''
543-
have = cc.has_header_symbol(decl[1], decl[0], prefix : prefix)
544-
conf.set10('HAVE_' + decl[0], have)
545-
endforeach
546-
547457
foreach ident : ['secure_getenv', '__secure_getenv']
548458
conf.set10('HAVE_' + ident.to_upper(), cc.has_function(ident))
549459
endforeach
@@ -680,11 +590,8 @@ if not cc.has_header('sys/capability.h')
680590
error('POSIX caps headers not found')
681591
endif
682592
foreach header : ['crypt.h',
683-
'linux/btrfs_tree.h',
684-
'linux/fou.h',
685593
'linux/memfd.h',
686594
'linux/vm_sockets.h',
687-
'linux/can/vxcan.h',
688595
'sys/auxv.h',
689596
'valgrind/memcheck.h',
690597
'valgrind/valgrind.h',

src/basic/arphrd-list.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
/* SPDX-License-Identifier: LGPL-2.1+ */
22

33
#include <errno.h>
4-
#include <net/if_arp.h>
4+
#include <linux/if_arp.h>
55
#include <string.h>
66

77
#include "arphrd-list.h"
88
#include "macro.h"
9-
#include "missing_network.h"
109

1110
static const struct arphrd_name* lookup_arphrd(register const char *str, register GPERF_LEN_TYPE len);
1211

src/basic/btrfs-util.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
#include <errno.h>
44
#include <fcntl.h>
55
#include <inttypes.h>
6+
#include <linux/btrfs_tree.h>
67
#include <linux/fs.h>
78
#include <linux/loop.h>
9+
#include <linux/magic.h>
810
#include <stddef.h>
911
#include <stdio.h>
1012
#include <stdlib.h>
@@ -26,7 +28,6 @@
2628
#include "fs-util.h"
2729
#include "io-util.h"
2830
#include "macro.h"
29-
#include "missing.h"
3031
#include "path-util.h"
3132
#include "rm-rf.h"
3233
#include "smack-util.h"

src/basic/generate-arphrd-list.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22
set -eu
33

4-
$1 -dM -include net/if_arp.h -include "$2" -include "$3" - </dev/null | \
4+
$1 -dM -include linux/if_arp.h -include "$2" - </dev/null | \
55
awk '/^#define[ \t]+ARPHRD_[^ \t]+[ \t]+[^ \t]/ { print $2; }' | \
66
sed -e 's/ARPHRD_//'

src/basic/linux/README

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
The files in this directory are copied from kernel-5.0, and the following modifications are applied:
2+
- btrfs.h: drop '__user' attributes
3+
- if.h: drop '#include <linux/compiler.h>' and '__user' attributes

0 commit comments

Comments
 (0)