summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMartin Matuska <martin@matuska.org>2021-08-21 01:39:31 +0200
committerMartin Matuska <martin@matuska.org>2021-08-21 02:53:33 +0200
commit5e646b890fb3c59ef6f94221ef8ef9ae62a8a9d6 (patch)
treec5d40b1f79737c55f3d6d4b6d2cdb14c835762b5 /CMakeLists.txt
parentc6f17a04481f265b4eaca8e3fa586d7ba2461a35 (diff)
downloadlibarchive-5e646b890fb3c59ef6f94221ef8ef9ae62a8a9d6.tar.gz
Fix extracting hardlinks to symlinks
On platforms that support the linkat(2) function we can safely write hardlinks to symlinks as linkat(2) does not follow symlinks by default. Fixes #1044
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d6b9b2f9..6dfdf966 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1352,6 +1352,7 @@ CHECK_FUNCTION_EXISTS_GLIBC(lchflags HAVE_LCHFLAGS)
CHECK_FUNCTION_EXISTS_GLIBC(lchmod HAVE_LCHMOD)
CHECK_FUNCTION_EXISTS_GLIBC(lchown HAVE_LCHOWN)
CHECK_FUNCTION_EXISTS_GLIBC(link HAVE_LINK)
+CHECK_FUNCTION_EXISTS_GLIBC(linkat HAVE_LINKAT)
CHECK_FUNCTION_EXISTS_GLIBC(localtime_r HAVE_LOCALTIME_R)
CHECK_FUNCTION_EXISTS_GLIBC(lstat HAVE_LSTAT)
CHECK_FUNCTION_EXISTS_GLIBC(lutimes HAVE_LUTIMES)