Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 836631

Summary: net-libs/libnftnl-1.2.3 fails tests on MUSL: nft-rule-add.c:112:21: error: struct tcphdr has no member named dest
Product: Gentoo Linux Reporter: Agostino Sarubbo <ago>
Component: Current packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: CONFIRMED ---    
Severity: normal CC: musl
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log

Description Agostino Sarubbo gentoo-dev 2022-04-02 07:57:08 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: net-libs/libnftnl-1.2.1 fails tests on MUSL.
Discovered on: amd64 (internal ref: tinderbox_musl)

NOTE:
This machine uses MUSL libc
Comment 1 Agostino Sarubbo gentoo-dev 2022-04-02 07:57:10 UTC
Created attachment 768464 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2022-09-21 07:44:06 UTC
tinderbox_musl has reproduced this issue with version 1.2.3 - Updating summary.
Comment 3 Mike Gilbert gentoo-dev 2022-09-21 15:24:51 UTC
struct tcphdr comes from netinet/tcp.h.

On musl, tcphdr.dest is hidden behind _GNU_SOURCE. On glibc, it is always available.

I'm not sure if we need to fix libnftnl or musl here.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-09-22 04:16:57 UTC
(In reply to Mike Gilbert from comment #3)
> struct tcphdr comes from netinet/tcp.h.
> 
> On musl, tcphdr.dest is hidden behind _GNU_SOURCE. On glibc, it is always
> available.
> 
> I'm not sure if we need to fix libnftnl or musl here.

netinet_tcp.h(0P) is very light on what netinet/tcp.h must provide, so I think it's right that it's guarded behind GNU_SOURCE.