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