]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:util_sec: fix the build on non-linux platforms
authorStefan Metzmacher <metze@samba.org>
Wed, 6 Nov 2019 07:47:31 +0000 (08:47 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 27 Mar 2020 09:02:37 +0000 (09:02 +0000)
This fixes a regression introduced by
"util_sec.c: Move __thread variable to global scope"
(5a80f399b51221fb0b8661f30d940ca24e1ce627).

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/lib/util_sec.c

index b6fb6c0a4a18e50d40503b3d867aca2ecc0475ca..4c3d3dc78812f7ffd238c3a612aebadd2de48d4a 100644 (file)
@@ -444,17 +444,17 @@ void become_user_permanently(uid_t uid, gid_t gid)
        assert_gid(gid, gid);
 }
 
-#ifdef HAVE___THREAD
-       struct cache_t {
+#if defined(HAVE_LINUX_THREAD_CREDENTIALS) && defined(HAVE___THREAD)
+       struct set_thread_credentials_cache {
                bool active;
                uid_t uid;
                gid_t gid;
                size_t setlen;
                uintptr_t gidset;
        };
-
-static __thread struct cache_t cache;
+static __thread struct set_thread_credentials_cache cache;
 #endif
+
 /**********************************************************
  Function to set thread specific credentials. Leave
  saved-set uid/gid alone.Must be thread-safe code.