>From 58c0514fa38c16ebef9db95e215195570862f872 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Wed, 30 Aug 2017 00:16:39 -0700 Subject: [PATCH] renameat2: fix compilation on alpine linux * m4/renameat.m4: Check for presence. * lib/renameat2.h: Only include if present. Reported by Assaf Gordon on Alpine Linux. --- ChangeLog | 7 +++++++ lib/renameat2.h | 2 +- m4/renameat.m4 | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 994123a..0b3c06a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2017-08-30 Pádraig Brady + + renameat2: fix compilation on alpine linux + * m4/renameat.m4: Check for presence. + * lib/renameat2.h: Only include if present. + Reported by Assaf Gordon on Alpine Linux. + 2017-08-24 Paul Eggert glob: try to port recent changes to MS-Windows diff --git a/lib/renameat2.h b/lib/renameat2.h index da3d78c..f69929b 100644 --- a/lib/renameat2.h +++ b/lib/renameat2.h @@ -18,7 +18,7 @@ /* Get RENAME_* macros from linux/fs.h if present, otherwise supply the traditional Linux values. */ -#ifdef __linux__ +#if HAVE_LINUX_FS_H # include #endif #ifndef RENAME_NOREPLACE diff --git a/m4/renameat.m4 b/m4/renameat.m4 index cfbfe15..1b97774 100644 --- a/m4/renameat.m4 +++ b/m4/renameat.m4 @@ -14,6 +14,7 @@ AC_DEFUN([gl_FUNC_RENAMEAT], AC_REQUIRE([gl_FUNC_RENAME]) AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + AC_CHECK_HEADERS([linux/fs.h]) AC_CHECK_FUNCS_ONCE([renameat]) if test $ac_cv_func_renameat = no; then HAVE_RENAMEAT=0 -- 2.9.3