]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
missing_syscall: mandate __NR_memfd_create
authorMike Yuan <me@yhndnzj.com>
Thu, 2 Jan 2025 19:32:51 +0000 (20:32 +0100)
committerMike Yuan <me@yhndnzj.com>
Thu, 2 Jan 2025 19:34:20 +0000 (20:34 +0100)
Follow-up for 6db5a6e799db9d95185cd0c2a327109e80114aea

For basic system functionality we require memfd nowadays,
so fail the build if syscall number not available.

src/basic/missing_syscall.h

index e2cd8b4e35602e9c049776d63c1430c425ca3fae..00aeda726a65bb6646216fe23161078d367240f0 100644 (file)
@@ -80,12 +80,7 @@ static inline int missing_ioprio_set(int which, int who, int ioprio) {
 
 #if !HAVE_MEMFD_CREATE
 static inline int missing_memfd_create(const char *name, unsigned int flags) {
-#  ifdef __NR_memfd_create
         return syscall(__NR_memfd_create, name, flags);
-#  else
-        errno = ENOSYS;
-        return -1;
-#  endif
 }
 
 #  define memfd_create missing_memfd_create