ccae17
From a6e839be2c5a77c22a8c72cad001e3f87eaedf2e Mon Sep 17 00:00:00 2001
84659d
From: Petr Lautrbach <plautrba@redhat.com>
84659d
Date: Mon, 11 Mar 2019 15:26:43 +0100
ccae17
Subject: [PATCH] libselinux: Allow to override OVERRIDE_GETTID from command
ccae17
 line
84659d
84659d
$ make CFLAGS="$CFLAGS -DOVERRIDE_GETTID=0" ...
84659d
84659d
Drop this as soon as glibc-2.30 will become real 2.30 version, see
84659d
https://bugzilla.redhat.com/show_bug.cgi?id=1685594
84659d
84659d
Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
84659d
---
84659d
 libselinux/src/procattr.c | 2 ++
84659d
 1 file changed, 2 insertions(+)
84659d
84659d
diff --git a/libselinux/src/procattr.c b/libselinux/src/procattr.c
84659d
index c6799ef2..cbb6824e 100644
84659d
--- a/libselinux/src/procattr.c
84659d
+++ b/libselinux/src/procattr.c
84659d
@@ -24,6 +24,7 @@ static __thread char destructor_initialized;
84659d
 
84659d
 /* Bionic and glibc >= 2.30 declare gettid() system call wrapper in unistd.h and
84659d
  * has a definition for it */
84659d
+#ifndef OVERRIDE_GETTID
84659d
 #ifdef __BIONIC__
84659d
   #define OVERRIDE_GETTID 0
84659d
 #elif !defined(__GLIBC_PREREQ)
84659d
@@ -33,6 +34,7 @@ static __thread char destructor_initialized;
84659d
 #else
84659d
   #define OVERRIDE_GETTID 0
84659d
 #endif
84659d
+#endif
84659d
 
84659d
 #if OVERRIDE_GETTID
84659d
 static pid_t gettid(void)
84659d
-- 
84659d
2.21.0
84659d