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

This commit is contained in:
Akira TAGOH 2013-12-16 17:44:37 +09:00
parent 1132c98b7b
commit 5c725f2f58
2 changed files with 4 additions and 2 deletions

View File

@ -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.

View File

@ -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)
{