From patchwork Tue Jun 16 23:35:36 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 137183 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5D00E48A080F for ; Tue, 16 Jun 2026 23:36:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5D00E48A080F X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from sonata.ens-lyon.org (domu-toccata.ens-lyon.fr [140.77.166.138]) by sourceware.org (Postfix) with ESMTPS id 71A7B48F60D2 for ; Tue, 16 Jun 2026 23:35:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 71A7B48F60D2 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bounce.ens-lyon.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 71A7B48F60D2 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=140.77.166.138 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1781652938; cv=none; b=Sy/nGN/P9B5jQcEZHQfjIQdkkIhSpCiJrCfFfcbF0eoRyyNnH2mbSu4tableMrlOcbEDEgC1Ly8ftMDdcKSRAfvxJuq92HyCI1Zmvq+51/AZBS75g7Y3XGRvdweYGG2OwMBeB9h2gE25lCqcXh2BE0Cn5MszDdHrYYAVTv/dZuU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1781652938; c=relaxed/simple; bh=K6Pabz8VOUlTK/LEP/wP6Nlx7Vr9OiAi+IbUzcREke8=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=WJbYHNHhBQFYJjyUWRUOUVG1DFZUSBt+iuO5x5yPx+8M0N6bxCYRlV6yaaXN+Cy/0QCnPL32YND8ocCw3feWy0+L1pHb0ZGegCfyTwd9YKS5SvZI/jhdoMedXMSSOWJ7poohu1Jp6ZXcPug9CwP34xDMD7y/l+9bJR6Z6m2eusA= ARC-Authentication-Results: i=1; sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 71A7B48F60D2 Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 898FFA0326; Wed, 17 Jun 2026 01:35:37 +0200 (CEST) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yMNzIdlnWeQz; Wed, 17 Jun 2026 01:35:37 +0200 (CEST) Received: from end (aamiens-653-1-40-48.w83-192.abo.wanadoo.fr [83.192.199.48]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id 68565A0267; Wed, 17 Jun 2026 01:35:37 +0200 (CEST) Received: from samy by end with local (Exim 4.99.4) (envelope-from ) id 1wZdJg-00000003ApE-3LIL; Wed, 17 Jun 2026 01:35:36 +0200 From: Samuel Thibault To: libc-alpha@sourceware.org Cc: Samuel Thibault , commit-hurd@gnu.org Subject: [PATCH] Factorize net/ethernet.h Date: Wed, 17 Jun 2026 01:35:36 +0200 Message-ID: <20260616233536.756589-1-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.53.0 MIME-Version: 1.0 X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_PBL, SPF_HELO_PASS, SPF_PASS, TXREP shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org 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 #include -#include /* IEEE 802.3 Ethernet constants */ +#include /* 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