aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Timothy Redaelli <drizzt@gentoo.org> 2007-05-07 21:06:39 +0000
committerAvatar Timothy Redaelli <drizzt@gentoo.org> 2007-05-07 21:06:39 +0000
commit3ea7ca857e956d0076a60ad0a7ef92ea5562fe85 (patch)
treeda25e8a3fc2f7724bda5096d4a737609754ccf53
parent130f1ca3b3f048a02ec3590db8006604a762109c (diff)
downloadpaludis-3ea7ca857e956d0076a60ad0a7ef92ea5562fe85.tar.gz
paludis-3ea7ca857e956d0076a60ad0a7ef92ea5562fe85.tar.xz
Use lchflags instead of chflags (for symlinks)
-rw-r--r--configure.ac6
-rw-r--r--paludis/util/fs_entry.cc6
2 files changed, 6 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 5b54d1d..71d2a3e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -393,9 +393,9 @@ AC_CHECK_FUNCS([grantpt], [], [AC_MSG_ERROR([I need grantpt])])
AC_CHECK_FUNCS([unlockpt], [], [AC_MSG_ERROR([I need unlockpt])])
dnl }}}
-dnl {{{ check for chflags function
-AC_CHECK_FUNCS([chflags])
-AM_CONDITIONAL(HAVE_CHFLAGS, test x$ac_cv_func_chflags = xyes)
+dnl {{{ check for lchflags function
+AC_CHECK_FUNCS([lchflags])
+AM_CONDITIONAL(HAVE_LCHFLAGS, test x$ac_cv_func_lchflags = xyes)
dnl }}}
dnl {{{ check for canonicalize_file_name function
diff --git a/paludis/util/fs_entry.cc b/paludis/util/fs_entry.cc
index 003680c..45fb650 100644
--- a/paludis/util/fs_entry.cc
+++ b/paludis/util/fs_entry.cc
@@ -484,12 +484,12 @@ FSEntry::mkdir(mode_t mode)
bool
FSEntry::unlink()
{
-#ifdef HAVE_CHFLAGS
- if (0 != ::chflags(_path.c_str(), 0))
+#ifdef HAVE_LCHFLAGS
+ if (0 != ::lchflags(_path.c_str(), 0))
{
int e(errno);
if (e != ENOENT)
- throw FSError("chflags for unlink '" + _path + "' failed: " + ::strerror(e));
+ throw FSError("lchflags for unlink '" + _path + "' failed: " + ::strerror(e));
}
#endif