Skip to content
Snippets Groups Projects
Commit 887e4e23 authored by Nicola Joly's avatar Nicola Joly Committed by Morris Jette
Browse files

Add configure checks for faccessat/eacess

parent ea31431e
No related branches found
No related tags found
No related merge requests found
......@@ -112,12 +112,18 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the `eaccess' function. */
#undef HAVE_EACCESS
/* Define to 1 if you have the <errno.h> header file. */
#undef HAVE_ERRNO_H
/* Define to 1 if function EVP_MD_CTX_cleanup exists. */
#undef HAVE_EVP_MD_CTX_CLEANUP
/* Define to 1 if you have the `faccessat' function. */
#undef HAVE_FACCESSAT
/* Define to 1 if you have the `fdatasync' function. */
#undef HAVE_FDATASYNC
......
......@@ -19510,6 +19510,8 @@ for ac_func in \
cfmakeraw \
setresuid \
get_current_dir_name \
faccessat \
eaccess \
 
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
......
......@@ -201,6 +201,8 @@ AC_CHECK_FUNCS( \
cfmakeraw \
setresuid \
get_current_dir_name \
faccessat \
eaccess \
)
AC_CHECK_DECLS([hstrerror, strsignal, sys_siglist])
......
......@@ -539,11 +539,9 @@ _make_tmpdir(stepd_step_rec_t *job)
* still work with older systems we include this check.
*/
#if defined(__FreeBSD__)
#define __GLIBC__ (1)
#define __GLIBC_PREREQ(a,b) (1)
#endif
#if defined __GLIBC__ && __GLIBC_PREREQ(2, 4)
#if defined(HAVE_FACCESSAT)
else if (faccessat(AT_FDCWD, tmpdir, X_OK|W_OK, AT_EACCESS))
#elif defined(HAVE_EACCESS)
else if (eaccess(tmpdir, X_OK|W_OK)) /* check permissions */
#else
else if (euidaccess(tmpdir, X_OK|W_OK))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment