From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=iijW7p8U; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTP id E20835A004E for ; Wed, 27 Nov 2024 15:41:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732718495; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s1/yuxZ+T+FB0S8CafbImvyGFVVNdEiADNCwNjCublk=; b=iijW7p8UtZVK1sl2IRsu9RZ+B55Hf1NEFeaRo6rfvcAhzcQdkcZ9sTcfvuruNRuAQ9SicP OFS0WgGRIT7nYfx4/IBfNmSUs5+pkb3EB2RvaQShsRSBpWBET7NroKQZ33vS6cWdbBLxVZ oitSt2eB062k2P4KuwQVwsGlPSm2tcU= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-567-AI3KLdp1M1adboithvrHeQ-1; Wed, 27 Nov 2024 09:41:33 -0500 X-MC-Unique: AI3KLdp1M1adboithvrHeQ-1 X-Mimecast-MFC-AGG-ID: AI3KLdp1M1adboithvrHeQ Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 762F51955E91 for ; Wed, 27 Nov 2024 14:41:32 +0000 (UTC) Received: from lenovo-t14s.redhat.com (unknown [10.39.193.108]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 8B6871956056; Wed, 27 Nov 2024 14:41:31 +0000 (UTC) From: Laurent Vivier To: passt-dev@passt.top Subject: [PATCH] musl: fix conflict on ethhdr definition Date: Wed, 27 Nov 2024 15:41:30 +0100 Message-ID: <20241127144130.3637798-1-lvivier@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: tF94iWELl64ZQfLG6bbc7Gl_EGmCnGVNdmFx4LjRCRA_1732718492 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true Message-ID-Hash: 3SFOZ62UO5SAOUYQ7VIP7WRUQRYSQAJM X-Message-ID-Hash: 3SFOZ62UO5SAOUYQ7VIP7WRUQRYSQAJM X-MailFrom: lvivier@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Laurent Vivier X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: there is a conflict between netinet/if_ether.h provided by musl and linux/if_ether.h provided by the linux headers: In file included from passt.h:185, from tcp_vu.c:21: /usr/include/netinet/if_ether.h:115:8: error: redefinition of 'struct ethhdr' 115 | struct ethhdr { | ^~~~~~ In file included from /usr/include/linux/virtio_net.h:32, from tcp_vu.c:17: /usr/include/linux/if_ether.h:173:8: note: originally defined here 173 | struct ethhdr { | ^~~~~~ The kernel headers provide a flag to disable the definition in this case, __UAPI_DEF_ETHHDR (see /usr/include/linux/if_ether.h comment). Signed-off-by: Laurent Vivier --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index cb7448079de5..2aa56ada65fd 100644 --- a/Makefile +++ b/Makefile @@ -33,6 +33,9 @@ FLAGS += $(FORTIFY_FLAG) -O2 -pie -fPIE FLAGS += -DPAGE_SIZE=$(shell getconf PAGE_SIZE) FLAGS += -DVERSION=\"$(VERSION)\" FLAGS += -DDUAL_STACK_SOCKETS=$(DUAL_STACK_SOCKETS) +ifeq (musl, $(word 4,$(subst -, ,$(TARGET)))) +FLAGS += -D__UAPI_DEF_ETHHDR=0 +endif PASST_SRCS = arch.c arp.c checksum.c conf.c dhcp.c dhcpv6.c flow.c fwd.c \ icmp.c igmp.c inany.c iov.c ip.c isolation.c lineread.c log.c mld.c \ -- 2.47.0