X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=configure;h=748977525aff99ab77dbd46251596b63e14a8dda;hp=64323368fd00ae9f729c48ee8b10812706d96994;hb=5896d827e1e2c0f144b14b098181a59bf603ebe8;hpb=1581b82a4c8e0d341bddfdbd2fa7cbba8205ca82 diff --git a/configure b/configure index 64323368..74897752 100755 --- a/configure +++ b/configure @@ -939,7 +939,8 @@ cat > $TMPC << EOF #include int main(int argc, char **argv) { - strsep(NULL, NULL); + static char *string = "This is a string"; + strsep(&string, "needle"); return 0; } EOF @@ -963,6 +964,25 @@ if compile_prog "" "" "strcasestr"; then fi echo "strcasestr $strcasestr" +########################################## +# strlcat() probe +strlcat="no" +cat > $TMPC << EOF +#include +int main(int argc, char **argv) +{ + static char dst[64]; + static char *string = "This is a string"; + memset(dst, 0, sizeof(dst)); + strlcat(dst, string, sizeof(dst)); + return 0; +} +EOF +if compile_prog "" "" "strlcat"; then + strlcat="yes" +fi +echo "strlcat $strlcat" + ########################################## # getopt_long_only() probe getopt_long_only="no" @@ -1611,6 +1631,9 @@ fi if test "$strcasestr" = "yes" ; then output_sym "CONFIG_STRCASESTR" fi +if test "$strlcat" = "yes" ; then + output_sym "CONFIG_STRLCAT" +fi if test "$getopt_long_only" = "yes" ; then output_sym "CONFIG_GETOPT_LONG_ONLY" fi