]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libuuid: drop check for HAVE_TLS
authorThomas Weißschuh <thomas@t-8ch.de>
Tue, 7 May 2024 11:28:41 +0000 (13:28 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Tue, 14 May 2024 10:13:58 +0000 (12:13 +0200)
In the function get_clock() TLS is used unconditionally anyways.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
libuuid/src/gen_uuid.c

index aa353e443621036f9560c170dbba894314e1c341..4f3e4c39b4d9e1aa31840a1c7b4d6716fcfdc8d7 100644 (file)
 #include "sha1.h"
 #include "timeutils.h"
 
-#ifdef HAVE_TLS
 #define THREAD_LOCAL static __thread
-#else
-#define THREAD_LOCAL static
-#endif
 
 #ifdef _WIN32
 static void gettimeofday (struct timeval *tv, void *dummy)
@@ -585,7 +581,6 @@ int __uuid_generate_time_cont(uuid_t out, int *num, uint32_t cont_offset)
  * the UUID anyway, but returns -1. Otherwise, returns 0.
  */
 static int uuid_generate_time_generic(uuid_t out) {
-#ifdef HAVE_TLS
        /* thread local cache for uuidd based requests */
        THREAD_LOCAL int                num = 0;
        THREAD_LOCAL int                cache_size = CS_MIN;
@@ -638,10 +633,6 @@ static int uuid_generate_time_generic(uuid_t out) {
                        last_used = cache_size;
                return 0;
        }
-#else
-       if (get_uuid_via_daemon(UUIDD_OP_TIME_UUID, out, 0) == 0)
-               return 0;
-#endif
 
        return __uuid_generate_time(out, NULL);
 }