erofs-utils: lib: fix undeclared gettid()
PATCH 1/1 erofs-utils: lib: fix undeclared gettid()
gettid() is only available since glibc 2.30.
Fixes 799c933bbefb ("erofs-utils: add ublk userspace block device backend")
Signed-off-by Gao Xiang <[email protected]>
--- configure.ac | 1 + lib/backends/ublk.c | 5 +++++ 2 files changed, 6 insertions(+)
configure.ac +1 -0
@@ -284,6 +284,7 @@ AC_CHECK_FUNCS(m4_flatten([ fallocate getrandom getrlimit + gettid gettimeofday lgetxattr llistxattr
lib/backends/ublk.c +5 -0
@@ -29,6 +29,11 @@#include <liburing.h> #endif +#ifndef HAVE_GETTID +#include <sys/syscall.h> +#define gettid () syscall(__NR_gettid) +#endif +/* (Legacy) Admin commands, issued by ublk server, and handled by ublk driver */ #define UBLK_CMD_GET_QUEUE_AFFINITY 0x01#define UBLK_CMD_GET_DEV_INFO 0x02
Signature · 1 line
2.43.5