Make clang happy otherwise it complains about variable scope
fixes
source3/./lib/util_sec.c:470:4: error: '__thread' variables must have global storage
} __thread cache;
^
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Reviewed-by: Matthias Dieter Wallnöfer <mdw@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
assert_gid(gid, gid);
}
+#ifdef HAVE___THREAD
+ struct cache_t {
+ bool active;
+ uid_t uid;
+ gid_t gid;
+ size_t setlen;
+ uintptr_t gidset;
+ };
+
+static __thread struct cache_t cache;
+#endif
/**********************************************************
Function to set thread specific credentials. Leave
saved-set uid/gid alone.Must be thread-safe code.
* available.
*/
#ifdef HAVE___THREAD
- static struct {
- bool active;
- uid_t uid;
- gid_t gid;
- size_t setlen;
- uintptr_t gidset;
- } __thread cache;
-
if (cache.active &&
cache.uid == uid &&
cache.gid == gid &&