]> git.ipfire.org Git - thirdparty/rsync.git/commit
build: fall back to do_mknod() when mknodat() is unavailable (#896)
authorAndrew Tridgell <andrew@tridgell.net>
Thu, 4 Jun 2026 04:46:38 +0000 (14:46 +1000)
committerAndrew Tridgell <andrew@tridgell.net>
Thu, 4 Jun 2026 20:35:12 +0000 (06:35 +1000)
commitb3107260a2c34bf41ffa0edfd70101681968641a
treedd14dfbbdc7d0b464274cb6c89483de27cb8d9de
parent7db73ad9a1b8721f14a43219d73127b23b86fe00
build: fall back to do_mknod() when mknodat() is unavailable (#896)

do_mknod_at() (the symlink-race-safe variant used by a non-chrooted
daemon receiver) calls mknodat()/mkfifoat(), but the at-variant was
gated only on AT_FDCWD.  Older Darwin declares AT_FDCWD without
mknodat(), so the build failed with "mknodat undeclared".

Probe mknodat()/mkfifoat() in configure and require HAVE_MKNODAT for the
at-variant; without it do_mknod_at() falls back to do_mknod(), exactly
as it already does where AT_FDCWD is missing.  Linux keeps the mknodat
path since HAVE_MKNODAT is defined there.

Fixes: #896
configure.ac
syscall.c