1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-06 13:17:44 +03:00

tree-wide: Always include <net/if.h> before related linux headers

Otherwise, we get redefinition errors if <net/if.h> is included later
on by another header.
This commit is contained in:
Daan De Meyer 2023-08-14 12:54:40 +02:00
parent 59120e89d8
commit 2af02e6165
6 changed files with 14 additions and 8 deletions

View File

@ -5,8 +5,9 @@
#include <errno.h>
#include <sys/ioctl.h>
#include <linux/if_arp.h>
#include <linux/if_infiniband.h>
#include <net/if.h>
#include <linux/if_arp.h> /* Must be included after <net/if.h> */
#include <linux/if_infiniband.h> /* Must be included after <net/if.h> */
#include "sd-dhcp6-client.h"

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <netinet/in.h>
#include <linux/if_arp.h>
#include <linux/if.h>
#include <net/if.h>
#include <linux/if_arp.h> /* Must be included after <net/if.h> */
#include <linux/if.h> /* Must be included after <net/if.h> */
#include "sd-dhcp-server.h"

View File

@ -3,7 +3,8 @@
#include <netinet/in.h>
#include <sys/socket.h>
#include <unistd.h>
#include <linux/if.h>
#include <net/if.h>
#include <linux/if.h> /* Must be included after <net/if.h> */
#include <linux/fib_rules.h>
#include <linux/nexthop.h>
#include <linux/nl80211.h>

View File

@ -1,7 +1,8 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <netinet/in.h>
#include <linux/if.h>
#include <net/if.h>
#include <linux/if.h> /* Must be included after <net/if.h> */
#include "alloc-util.h"
#include "dns-domain.h"

View File

@ -1,6 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <linux/if.h>
#include <net/if.h>
#include <linux/if.h> /* Must be included after <net/if.h> */
#include <unistd.h>
#include "sd-network.h"

View File

@ -1,6 +1,7 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <linux/netdevice.h>
#include <net/if.h>
#include <linux/netdevice.h> /* Must be included after <net/if.h> */
#include <netinet/ether.h>
#include <unistd.h>