X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=configure;h=59af1b6c3d1b8df402300b85b9ea454dd9c0c927;hb=deeb3c11c212e99e8d1162e03e0ef734bd0d01a7;hp=2c6bfc874080721be8d1b730e94ad12f910aa265;hpb=484b0b659566d04dc4d7305b120216708e8bbe31;p=fio.git diff --git a/configure b/configure index 2c6bfc87..59af1b6c 100755 --- a/configure +++ b/configure @@ -1483,12 +1483,16 @@ int main(int argc, char **argv) { rados_t cluster; rados_ioctx_t io_ctx; + const char cluster_name[] = "ceph"; + const char user_name[] = "client.admin"; const char pool[] = "rbd"; - int major, minor, extra; - rbd_version(&major, &minor, &extra); + rbd_version(&major, &minor, &extra); + /* The rados_create2 signature required was only introduced in ceph 0.65 */ + rados_create2(&cluster, cluster_name, user_name, 0); rados_ioctx_create(cluster, pool, &io_ctx); + return 0; } EOF @@ -1970,6 +1974,25 @@ if compile_prog "" "" "bool"; then fi print_config "bool" "$have_bool" +########################################## +# Check whether we have strndup() +strndup="no" +cat > $TMPC << EOF +#include +#include +int main(int argc, char **argv) +{ + char *res = strndup("test string", 8); + + free(res); + return 0; +} +EOF +if compile_prog "" "" "strndup"; then + strndup="yes" +fi +print_config "strndup" "$strndup" + ########################################## # check march=armv8-a+crc+crypto if test "$march_armv8_a_crc_crypto" != "yes" ; then @@ -2227,6 +2250,9 @@ fi if test "$have_bool" = "yes" ; then output_sym "CONFIG_HAVE_BOOL" fi +if test "$strndup" = "yes" ; then + output_sym "CONFIG_HAVE_STRNDUP" +fi if test "$disable_opt" = "yes" ; then output_sym "CONFIG_DISABLE_OPTIMIZATIONS" fi