Checks
| Context |
Check |
Description |
| redhat-pt-bot/TryBot-apply_patch |
success
|
Patch applied to master at the time it was sent
|
| linaro-tcwg-bot/tcwg_glibc_build--master-arm |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_glibc_check--master-aarch64 |
success
|
Test passed
|
| redhat-pt-bot/TryBot-32bit |
success
|
Build for i686
|
| linaro-tcwg-bot/tcwg_glibc_check--master-arm |
success
|
Test passed
|
Commit Message
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
Comments
* Samuel Thibault:
> 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.
Do we want applications to include <net/if_ether.h>? If not, this
should be a bits/ header, with the usual #error guard.
Thanks,
Florian
Florian Weimer, le mer. 17 juin 2026 10:36:59 +0200, a ecrit:
> * Samuel Thibault:
>
> > 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.
>
> Do we want applications to include <net/if_ether.h>?
That's a common thing on BSD systems, like the other net/if_*.h
Samuel
Hello,
Samuel Thibault, le mer. 17 juin 2026 19:56:42 +0200, a ecrit:
> Florian Weimer, le mer. 17 juin 2026 10:36:59 +0200, a ecrit:
> > * Samuel Thibault:
> >
> > > 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.
> >
> > Do we want applications to include <net/if_ether.h>?
>
> That's a common thing on BSD systems, like the other net/if_*.h
So, do we prefer to hide it in bits/ on Linux? I see that dietlibc does
ship a net/if_ether.h on Linux.
Samuel
* Samuel Thibault:
> Florian Weimer, le mer. 17 juin 2026 10:36:59 +0200, a ecrit:
>> * Samuel Thibault:
>>
>> > 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.
>>
>> Do we want applications to include <net/if_ether.h>?
>
> That's a common thing on BSD systems, like the other net/if_*.h
Okay, then this is probably the direction we should move in.
Would you please post a version of the patch with a NEWS entry?
Thanks,
Florian
Hello,
Florian Weimer, le ven. 26 juin 2026 13:26:54 +0200, a ecrit:
> > Florian Weimer, le mer. 17 juin 2026 10:36:59 +0200, a ecrit:
> >> * Samuel Thibault:
> >>
> >> > 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.
> >>
> >> Do we want applications to include <net/if_ether.h>?
> >
> > That's a common thing on BSD systems, like the other net/if_*.h
>
> Okay, then this is probably the direction we should move in.
>
> Would you please post a version of the patch with a NEWS entry?
I have done so.
Samuel
@@ -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
similarity index 97%
rename from sysdeps/unix/sysv/linux/net/ethernet.h
rename to 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
similarity index 100%
rename from sysdeps/mach/hurd/net/if_ether.h
rename to sysdeps/gnu/net/if_ether.h
@@ -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)
@@ -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 \
new file mode 100644
@@ -0,0 +1 @@
+#include <linux/if_ether.h>