Skip to content

[ABI BREAK] abis: Fix definition of fd_set#1658

Open
Dennisbonke wants to merge 1 commit intomanagarm:masterfrom
Dennisbonke:mlibc-linux-2
Open

[ABI BREAK] abis: Fix definition of fd_set#1658
Dennisbonke wants to merge 1 commit intomanagarm:masterfrom
Dennisbonke:mlibc-linux-2

Conversation

@Dennisbonke
Copy link
Member

No description provided.

@Mathewnd Mathewnd changed the title abis: Fix definition of fd_set [ABI BREAK] abis: Fix definition of fd_set Jan 11, 2026
@Dennisbonke Dennisbonke force-pushed the mlibc-linux-2 branch 3 times, most recently from f826ec3 to 62b86ad Compare January 11, 2026 21:55

typedef struct __attribute__((__aligned__(__alignof__(long)))) {
__mlibc_uint8 fds_bits[128];
typedef long int __fd_mask;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While I get that the linux kernel has this as long, making this signed breaks our implementations of the FD_* macros.

typedef struct {
/* libtirpc reaches into fds_bits directly, so we must keep the name and type exactly as expected.
* This now matches the definition in sys/select.h from glibc. */
__fd_mask fds_bits[FD_SETSIZE / __NFDBITS];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to have the name of this be switched between this and a double underscore-prefixed variant based on the appropriate feature test macros, as earlier POSIX specs required this name, while current ones don't.

@Dennisbonke Dennisbonke force-pushed the mlibc-linux-2 branch 3 times, most recently from c92cf08 to 859e25b Compare January 12, 2026 20:13
@Dennisbonke Dennisbonke force-pushed the mlibc-linux-2 branch 3 times, most recently from eb3f878 to afb2571 Compare January 29, 2026 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants