Index: configure ================================================================== --- a/configure +++ b/configure @@ -296,10 +296,32 @@ if [ "$STRLCPY" = no ]; then echo "#define strlcpy(dst, src, n) " \ "((size_t)snprintf(dst, n, \"%s\", src))" \ >>$CONFIG_H fi + +if [ -z "$STRVERSCMP" ]; then + printf "Testing for strverscmp ... " + cat <_strverscmp.c +#define _GNU_SOURCE +#include +int main(void) { + strverscmp(NULL, NULL); + return 0; +} +EOF + if $XCC _strverscmp.c -o _strverscmp 2>/dev/null; then + STRVERSCMP=yes + else + STRVERSCMP=no + fi + echo "$STRVERSCMP" + rm -f _strverscmp.c _strverscmp +fi +if [ "$STRVERSCMP" = yes ]; then + echo "#define HAVE_STRVERSCMP" >>$CONFIG_H +fi if [ -z "$LIBDIR" ]; then printf "lib directory name ... " case `readlink /lib` in "") LIBNAME="lib";; Index: src/libdhcpcd/dhcpcd.c ================================================================== --- a/src/libdhcpcd/dhcpcd.c +++ b/src/libdhcpcd/dhcpcd.c @@ -607,11 +607,11 @@ assert(con); return con->progname; } -#ifndef __GLIBC__ +#ifndef HAVE_STRVERSCMP /* Good enough for our needs */ static int strverscmp(const char *s1, const char *s2) { int s1maj, s1min, s1part;