Ongoing problems with openat2

Jeffrey Law jeffrey.law@oss.qualcomm.com
Mon Jan 5 16:47:24 GMT 2026



On 1/5/2026 5:34 AM, Adhemerval Zanella Netto wrote:
>
> On 04/01/26 16:22, Jeffrey Law wrote:
>> This has been going on for a little while since openat2 was added.  On alpha, hppa and possibly others I'm seeing this failure with the trunk:
>>
>> 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 *, long 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 *, long unsigned int)'
>>    484 | extern int openat2 (int __dfd, const char * __filename,
>>        |            ^~~~~~~
>>
>> Jeff
> What are the gcc version and the configure options used? I haven't see any
> build issue for any supported configuration with gcc-15 with a configuration
> that should cover most of supported features [1].
I've seen it across both the installed version of gcc (which I think was 
gcc-13) as well as with a just built gcc trunk.    No real interesting 
configuration options for glibc -- --disable-werror, a --prefix option 
and --enable-add-ons.   The code driving that build hasn't changed 
months, if not years...  I don't think I've changed the docker container 
with the root filesystem in a similar kind of timeframe.

I suspect I'm going to have to get a -save-temps output and see where 
the prototypes are coming from as well as the definition of size_t if 
you aren't seeing similar behavior.

Jeff




More information about the Libc-alpha mailing list