[PATCH] posix: Sync tempname with gnulib (BZ 30958)

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Mon Oct 23 14:09:22 GMT 2023



On 23/10/23 10:31, Florian Weimer wrote:
> * Adhemerval Zanella:
> 
>> +#if _LIBC || (defined CLOCK_REALTIME && HAVE_CLOCK_GETTIME)
>> +  struct __timespec64 tv;
>> +  __clock_gettime64 (CLOCK_REALTIME, &tv);
>> +  v = mix_random_values (v, tv.tv_sec);
>> +  v = mix_random_values (v, tv.tv_nsec);
>> +#endif
>>  
>> +  *r = mix_random_values (v, clock ());
>> +  return false;
> 
> We shouldn't have fallback to clock in glibc.

Sounds reasonable, I will update the patch.


More information about the Libc-alpha mailing list