The Linux version is much more up to date, and is OS-independent.
This introduces net/if_ether.h which just pulls linux/if_ether.h, like
many other such compatibility headers.
---
sysdeps/gnu/Makefile | 2 +-
sysdeps/{unix/sysv/linux => gnu}/net/ethernet.h | 2 +-
sysdeps/{mach/hurd => gnu}/net/if_ether.h | 0
sysdeps/mach/hurd/Makefile | 2 +-
sysdeps/unix/sysv/linux/Makefile | 1 -
sysdeps/unix/sysv/linux/net/if_ether.h | 1 +
6 files changed, 4 insertions(+), 4 deletions(-)
rename sysdeps/{unix/sysv/linux => gnu}/net/ethernet.h (97%)
rename sysdeps/{mach/hurd => gnu}/net/if_ether.h (100%)
create mode 100644 sysdeps/unix/sysv/linux/net/if_ether.h
diff --git a/sysdeps/gnu/Makefile b/sysdeps/gnu/Makefile
index 2844d37fa0..fcac64abf3 100644
--- a/sysdeps/gnu/Makefile
+++ b/sysdeps/gnu/Makefile
@@ -82,5 +82,5 @@ sysdep_headers += \
endif
ifeq ($(subdir),socket)
-sysdep_headers += net/if_arp.h
+sysdep_headers += net/ethernet.h net/if_arp.h net/if_ether.h
endif
diff --git a/sysdeps/unix/sysv/linux/net/ethernet.h b/sysdeps/gnu/net/ethernet.h
similarity index 97%
rename from sysdeps/unix/sysv/linux/net/ethernet.h
rename to sysdeps/gnu/net/ethernet.h
index b468b5b2c4..0f06c1fb24 100644
--- a/sysdeps/unix/sysv/linux/net/ethernet.h
+++ b/sysdeps/gnu/net/ethernet.h
@@ -24,7 +24,7 @@
#include <sys/types.h>
#include <stdint.h>
-#include <linux/if_ether.h> /* IEEE 802.3 Ethernet constants */
+#include <net/if_ether.h> /* IEEE 802.3 Ethernet constants */
__BEGIN_DECLS
diff --git a/sysdeps/mach/hurd/net/if_ether.h b/sysdeps/gnu/net/if_ether.h
similarity index 100%
rename from sysdeps/mach/hurd/net/if_ether.h
rename to sysdeps/gnu/net/if_ether.h
diff --git a/sysdeps/mach/hurd/Makefile b/sysdeps/mach/hurd/Makefile
index a5027510af..f5885cfea0 100644
--- a/sysdeps/mach/hurd/Makefile
+++ b/sysdeps/mach/hurd/Makefile
@@ -224,7 +224,7 @@ sysdep_headers += nfs/nfs.h
endif
ifeq ($(subdir),socket)
-sysdep_headers += net/ethernet.h net/if_ether.h net/route.h
+sysdep_headers += net/route.h
endif
ifeq ($(subdir),nis)
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index 7d87888dab..5dbabe5928 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -476,7 +476,6 @@ endif
ifeq ($(subdir),socket)
sysdep_headers += \
bits/socket-constants.h \
- net/ethernet.h \
net/if_packet.h \
net/if_ppp.h \
net/if_shaper.h \
diff --git a/sysdeps/unix/sysv/linux/net/if_ether.h
b/sysdeps/unix/sysv/linux/net/if_ether.h
new file mode 100644
index 0000000000..060ef22070
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/net/if_ether.h
@@ -0,0 +1 @@
+#include <linux/if_ether.h>
--
2.53.0