]> granicus.if.org Git - p11-kit/commitdiff
common: Fix uClibc-ng compilation
authorRosen Penev <rosenp@gmail.com>
Mon, 1 Jul 2019 20:33:12 +0000 (13:33 -0700)
committerDaiki Ueno <ueno@gnu.org>
Sat, 6 Jul 2019 05:32:40 +0000 (07:32 +0200)
program_invocation_short_name is const under uClibc-ng.

configure.ac

index 492288a5582f497e32e4de571fb0ba492ddea5ec..66ade65770acd885bdec89d8c0fd2e941fcce811 100644 (file)
@@ -135,9 +135,9 @@ if test "$os_unix" = "yes"; then
                [AC_MSG_ERROR([could not find required gmtime_r() function])])
 
        # Check if these are declared and/or available to link against
-       AC_CHECK_DECLS([program_invocation_short_name])
+       AC_CHECK_DECLS([program_invocation_short_name]), [], [], [#include <error.h>])
        AC_MSG_CHECKING([whether program_invocation_short_name is available])
-       AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <argp.h>]],
+       AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <errno.h>]],
                                        [[program_invocation_short_name = "test";]])],
                       [AC_DEFINE([HAVE_PROGRAM_INVOCATION_SHORT_NAME], [1],
                                  [Whether program_invocation_short_name available])