[Pkg-samba-maint] Bug#1128849: samba: FTBFS with glibc 2.43 due to openat2 redefinition

Michael Tokarev mjt at tls.msk.ru
Tue Feb 24 07:05:36 GMT 2026


Control: tag -1 + pending

On 23.02.2026 20:08, Aurelien Jarno wrote:

> samba fails to build from source with glibc 2.43, currently in
> experimental. From the build log:
> 

> | In file included from ../../lib/replace/replace.c:28:
> | ../../lib/replace/system/filesys.h:278:20: error: conflicting types for ‘openat2’; have ‘long int(int,  const char *, struct open_how *, size_t)’ {aka ‘long int(int,  const char *, struct open_how *, long unsigned int)’}
> |   278 | static inline long openat2(int dirfd, const char *pathname,
> |       |                    ^~~~~~~
..
> The issue is due to a definition of the openat2 function, which is now
> also provided by glibc 2.43 [2]. This issue is not present upstream and
> is introduced by debian/patches/inline-openat2.diff. Removing this patch
> is enough to get samba built with glibc 2.43.

The issue is that samba never checked for the presence of openat2() in
glibc, since there was none so far, and since the manpage for it says so.

The fix is not to remove the patch but to add a check for openat2(),
which I did now.

I expect this issue to be rather common.

Thanks,

/mjt



More information about the Pkg-samba-maint mailing list