[Bug build/33848] New: Build fails at openat2.h, redefinition of 'struct open_how'
faber at faberman dot de
sourceware-bugzilla@sourceware.org
Tue Jan 27 13:36:52 GMT 2026
https://sourceware.org/bugzilla/show_bug.cgi?id=33848
Bug ID: 33848
Summary: Build fails at openat2.h, redefinition of 'struct
open_how'
Product: glibc
Version: 2.43
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: build
Assignee: unassigned at sourceware dot org
Reporter: faber at faberman dot de
CC: carlos at redhat dot com
Target Milestone: ---
Cross-compiling for arm/armhf with gcc 15.2.1-20260124, the build fails with
```
In file included from ../sysdeps/unix/sysv/linux/openat2.c:20:
../sysdeps/unix/sysv/linux/bits/openat2.h:25:8: error: redefinition of 'struct
open_how'
25 | struct open_how
| ^~~~~~~~
In file included from ../sysdeps/unix/sysv/linux/bits/fcntl-linux.h:473,
from ../sysdeps/unix/sysv/linux/arm/bits/fcntl.h:54,
from ../io/fcntl.h:35,
from ../include/fcntl.h:2,
from ../sysdeps/unix/sysv/linux/openat2.c:19:
../sysdeps/unix/sysv/linux/bits/openat2.h:25:8: note: originally defined here
25 | struct open_how
| ^~~~~~~~
```
Looking at the source the struct is not guarded against the redefinition when
being included multiple times.
I helped myself for the moment with
```
diff --git a/sysdeps/unix/sysv/linux/bits/openat2.h
b/sysdeps/unix/sysv/linux/bits/openat2.h
index 454d7699e7..0541138007 100644
--- a/sysdeps/unix/sysv/linux/bits/openat2.h
+++ b/sysdeps/unix/sysv/linux/bits/openat2.h
@@ -28,6 +28,7 @@ struct open_how
__uint64_t mode;
__uint64_t resolve;
};
+# define __glibc_has_open_how
#endif
/* how->resolve flags for openat2. */
```
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list