Follow @Openwall on Twitter for new release announcements and other news
[<prev] [<thread-prev] [day] [month] [year] [list]
Message-Id: <5A146258-94AD-4E6F-B330-C0CA79B5CD93@Wilcox-Tech.com>
Date: Wed, 8 Oct 2025 23:21:15 -0500
From: "A. Wilcox" <AWilcox@...cox-Tech.com>
To: musl@...ts.openwall.com
Cc: "Chen, Qi" <Qi.Chen@...driver.com>
Subject: Re: [PATCH 2/2] include/netinet/if_ether.h: guard ethhdr
 definition to better work with other header files

On Oct 8, 2025, at 21:53, Chen, Qi <Qi.Chen@...driver.com> wrote:
> 
> Hi Rich,
> 
> The problem is about the re-definition of 'struct ethhdr'.
> 
> For example, a header also defines 'struct ethhdr' and __UAPI_DEF_ETHHDR, and it's included *before* our <netinet/if_ether.h>, then the unconditional definition of 'struct ethhdr' in this header will be treated as an error.
> 
> Some background info:
> I was making systemd to compile with musl. I got this re-definition error. I checked the headers and thought that for different headers to work together, the definition of this 'struct ethhdr' needs to be guarded by the same macro.
> 
> Regards,
> Qi


Hi Qi,

You might consider patching systemd to have libc includes instead of using the Linux UAPI headers.  We did this at WTI with this commit: https://code.atwilcox.tech/sphen/scaly/systemd/-/commit/f423321481330c5f2f9158c490162b2e62b4c8bd

Best,
-Anna

--
Anna Wilcox (she/her)
SW Engineering: C++/Rust, DevOps, POSIX, Py/Ruby
Wilcox Technologies Inc.

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.