Commit 5c725f2f authored by Akira TAGOH's avatar Akira TAGOH
Browse files

Fix a build issue on platforms where doesn't support readlink()

parent 1132c98b
......@@ -148,7 +148,7 @@ AC_TYPE_PID_T
# Checks for library functions.
AC_FUNC_VPRINTF
AC_FUNC_MMAP
AC_CHECK_FUNCS([link mkstemp mkostemp _mktemp_s mkdtemp getopt getopt_long getprogname getexecname rand random lrand48 random_r rand_r regcomp regerror regexec regfree fstatvfs fstatfs lstat])
AC_CHECK_FUNCS([link mkstemp mkostemp _mktemp_s mkdtemp getopt getopt_long getprogname getexecname rand random lrand48 random_r rand_r readlink regcomp regerror regexec regfree fstatvfs fstatfs lstat])
dnl AC_CHECK_FUNCS doesn't check for header files.
dnl posix_fadvise() may be not available in older libc.
......
......@@ -149,7 +149,7 @@ retry:
#else
# if defined (HAVE_GETEXECNAME)
const char *p = getexecname ();
# else
# elif defined (HAVE_READLINK)
char buf[PATH_MAX + 1];
int len;
char *p = NULL;
......@@ -160,6 +160,8 @@ retry:
buf[len] = '\0';
p = buf;
}
# else
char *p = NULL;
# endif
if (p)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment