summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2019-05-22 17:12:55 -0600
committerJens Axboe <axboe@kernel.dk>2019-05-22 17:12:55 -0600
commitde5ed0e4d398bc9d4576f9b2b82d7686989c27e1 (patch)
tree2308beb179774d659e27095db6eebad3f581a376 /configure
parenta7760ecdb13394819b719f3f8181cc74c3d4affa (diff)
downloadfio-de5ed0e4d398bc9d4576f9b2b82d7686989c27e1.tar.gz
fio-de5ed0e4d398bc9d4576f9b2b82d7686989c27e1.tar.bz2
configure: add gettid() test
Apparently some newer glibcs now have it, decades after the fact. Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure18
1 files changed, 18 insertions, 0 deletions
diff --git a/configure b/configure
index d71387c0..ee421663 100755
--- a/configure
+++ b/configure
@@ -2374,6 +2374,21 @@ EOF
fi
print_config "MADV_HUGEPAGE" "$thp"
+##########################################
+# check for gettid()
+gettid="no"
+cat > $TMPC << EOF
+#include <unistd.h>
+int main(int argc, char **argv)
+{
+ return gettid();
+}
+EOF
+if compile_prog "" "" "gettid"; then
+ gettid="yes"
+fi
+print_config "gettid" "$gettid"
+
#############################################################################
if test "$wordsize" = "64" ; then
@@ -2645,6 +2660,9 @@ fi
if test "$__kernel_rwf_t" = "yes"; then
output_sym "CONFIG_HAVE_KERNEL_RWF_T"
fi
+if test "$gettid" = "yes"; then
+ output_sym "CONFIG_HAVE_GETTID"
+fi
if test "$fallthrough" = "yes"; then
CFLAGS="$CFLAGS -Wimplicit-fallthrough"
fi