erofs-utils: lib: uuid: fix compilation error if __NR_getrandom doesn't exist
Let's use rand() for insecure randomness without getrandom() support
on very old kernels to resolve issues as below:
uuid.c: In function ‘s_getrandom’:
uuid.c:44:32: error: ‘__NR_getrandom’ undeclared (first use in this function); did you mean ‘s_getrandom’?
44 | ssize_t r = (ssize_t)syscall(__NR_getrandom, out, size, flags);
| ^~~~~~~~~~~~~~
| s_getrandom
I'm not sure who cares since most users just use `--with-uuid` instead.
Fixes: 5de439566bc5 ("erofs-utils: Provide identical functionality without libuuid")
Reviewed-by: Sandeep Dhavale <dhavale@google.com>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20240729112524.930460-1-hsiangkao@linux.alibaba.com