diff --git a/lib/openat2.cc b/lib/openat2.cc index d868234..5b76bb0 100644 --- a/lib/openat2.cc +++ b/lib/openat2.cc @@ -4,9 +4,7 @@ // Compatibility for building on old libc for new kernel -#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0) - -// Every arch that defines this uses 437, except Alpha, where 437 is +// Every arch that defines this (so far) uses 437, except Alpha, where 437 is // mq_getsetattr. #ifndef SYS_openat2 @@ -17,8 +15,6 @@ #endif #endif -#endif // Linux version >= v5.6 - #include #include @@ -29,12 +25,7 @@ __attribute__((weak)) openat2(int const dirfd, const char *const pathname, struct open_how *const how, size_t const size) throw() { -#ifdef SYS_openat2 return syscall(SYS_openat2, dirfd, pathname, how, size); -#else - errno = ENOSYS; - return -1; -#endif } };