[Bug build/33848] Build fails at openat2.h, redefinition of 'struct open_how'

faber at faberman dot de sourceware-bugzilla@sourceware.org
Tue Jan 27 16:16:02 GMT 2026


https://sourceware.org/bugzilla/show_bug.cgi?id=33848

--- Comment #3 from Florian Faber <faber at faberman dot de> ---
Sam, that is the exact same error I get here:

```
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
      |        ^~~~~~~~
In file included from <command-line>:
../sysdeps/unix/sysv/linux/openat2.c:29:24: error: conflicting types for
'openat2'; have 'int(int,  const char *, const struct open_how *, size_t)' {aka
'int(int,  const char *, const struct open_how *, unsigned int)'}
   29 | weak_alias (__openat2, openat2)
      |                        ^~~~~~~
./../include/libc-symbols.h:156:26: note: in definition of macro '_weak_alias'
  156 |   extern __typeof (name) aliasname __attribute__ ((weak, alias
(#name))) \
      |                          ^~~~~~~~~
../sysdeps/unix/sysv/linux/openat2.c:29:1: note: in expansion of macro
'weak_alias'
   29 | weak_alias (__openat2, openat2)
      | ^~~~~~~~~~
../sysdeps/unix/sysv/linux/bits/fcntl-linux.h:484:12: note: previous
declaration of 'openat2' with type 'int(int,  const char *, const struct
open_how *, unsigned int)'
  484 | extern int openat2 (int __dfd, const char * __filename,
      |            ^~~~~~~
make[8]: *** [/tmp/build_arm-linux-gnueabihf_brs2a/glibc/sysd-rules:111:
/tmp/build_arm-linux-gnueabihf_brs2a/glibc/io/openat2.o] Error 1
```

I get it for all my cross-compile builds, be it arm/armhf/ppc/x86_64..

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Glibc-bugs mailing list