]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
missing_syscall: gettid is supported by glibc since 2.30
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 28 Feb 2025 13:27:32 +0000 (22:27 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 3 Mar 2025 17:24:49 +0000 (02:24 +0900)
Now our baseline of glibc is 2.31, hence it is OK to drop our
definition.

meson.build
src/basic/missing_syscall.h

index de89853134c9de3f1629fe3bd8989210c1421eaf..0b4e3bab3e72906f72b3aa577d55e7bfabb1187b 100644 (file)
@@ -603,8 +603,6 @@ foreach ident : ['secure_getenv', '__secure_getenv']
 endforeach
 
 foreach ident : [
-        ['gettid',            '''#include <sys/types.h>
-                                 #include <unistd.h>'''],
         ['fchmodat2',         '''#include <stdlib.h>
                                  #include <fcntl.h>'''],      # no known header declares fchmodat2
         ['pivot_root',        '''#include <stdlib.h>
index 5369cc53585df9630ae1f8de66cadae8e7babf2f..757cfdea19fcd43bd62113d6ec71e2842ad2720c 100644 (file)
@@ -68,21 +68,6 @@ static inline int missing_ioprio_set(int which, int who, int ioprio) {
 
 /* ======================================================================= */
 
-/* The syscall has been defined since forever, but the glibc wrapper was missing. */
-#if !HAVE_GETTID
-static inline pid_t missing_gettid(void) {
-#  if defined __NR_gettid && __NR_gettid >= 0
-        return (pid_t) syscall(__NR_gettid);
-#  else
-#    error "__NR_gettid not defined"
-#  endif
-}
-
-#  define gettid missing_gettid
-#endif
-
-/* ======================================================================= */
-
 #if !HAVE_NAME_TO_HANDLE_AT
 struct file_handle {
         unsigned int handle_bytes;