--- libeio/libeio.m4 2015/06/25 13:34:28 1.23 +++ libeio/libeio.m4 2017/06/23 03:10:19 1.24 @@ -81,7 +81,7 @@ size_t count = 2; ssize_t res; #if __linux - res = sendfile (fd, fd, offset, count); + res = sendfile (fd, fd, &offset, count); #elif __FreeBSD__ res = sendfile (fd, fd, offset, count, 0, &offset, 0); #elif __hpux @@ -136,7 +136,7 @@ #include int main (void) { - char name[] = "test123"; + char *name = "test123"; int res = prctl (PR_SET_NAME, (unsigned long)name, 0, 0, 0); } ])],ac_cv_prctl_set_name=yes,ac_cv_prctl_set_name=no)]) @@ -205,3 +205,16 @@ ]])],ac_cv_pipe2=yes,ac_cv_pipe2=no)]) test $ac_cv_pipe2 = yes && AC_DEFINE(HAVE_PIPE2, 1, pipe2(2) is available) +AC_CACHE_CHECK(for renameat2, ac_cv_renameat2, [AC_LINK_IFELSE([AC_LANG_SOURCE([[ +#include +#include +#include +int res; +int main (void) +{ + res = syscall (SYS_renameat2, 0, 0, 0, 0, RENAME_EXCHANGE | RENAME_NOREPLACE); + return 0; +} +]])],ac_cv_renameat2=yes,ac_cv_renameat2=no)]) +test $ac_cv_renameat2 = yes && AC_DEFINE(HAVE_RENAMEAT2, 1, renameat2(2) is available) +