utils: handle random_r fallback

musl does not seem to have it so fall back to rand() and srand().
This commit is contained in:
Wim Taymans 2023-02-22 16:46:31 +01:00
parent 4e298f2fe7
commit 78e5c2f3e6
2 changed files with 11 additions and 0 deletions

View file

@ -403,6 +403,7 @@ check_functions = [
['gettid', '#include <unistd.h>', ['-D_GNU_SOURCE'], []],
['memfd_create', '#include <sys/mman.h>', ['-D_GNU_SOURCE'], []],
['getrandom', '#include <stddef.h>\n#include <sys/random.h>', ['-D_GNU_SOURCE'], []],
['random_r', '#include <stdlib.h>', ['-D_GNU_SOURCE'], []],
['reallocarray', '#include <stdlib.h>', ['-D_GNU_SOURCE'], []],
['sigabbrev_np', '#include <string.h>', ['-D_GNU_SOURCE'], []],
['XSetIOErrorExitHandler', '#include <X11/Xlib.h>', [], [x11_dep]],