Workaround missing lchmod/lchown

Change-Id: I231a0010722619d389b763af35ff55f84ca9cb76
This commit is contained in:
2014-03-15 14:11:22 +01:00
parent 5b851f3a9c
commit 18f97ad415
8 changed files with 14 additions and 10 deletions

View File

@@ -32,7 +32,9 @@
/* Emulate lchmod(2), checking path with lstat(2) first to ensure that
* it's not a symlink, and then call chmod(2) */
#if !defined(__minix) && !defined(_LIBC)
#include "nbtool_config.h"
#endif /* !defined(__minix) && !defined(_LIBC) */
#if !HAVE_LCHMOD
#include <sys/stat.h>

View File

@@ -32,13 +32,19 @@
/* Emulate lchown(2), checking path with lstat(2) first to ensure that
* it's not a symlink, and then call chown(2) */
#if !defined(__minix) && !defined(_LIBC)
#include "nbtool_config.h"
#endif /* !defined(__minix) && !defined(_LIBC) */
#if !HAVE_LCHOWN
#include <sys/stat.h>
#include <errno.h>
#include <unistd.h>
#if defined(__minix) && defined(__weak_alias) && defined(_LIBC)
__weak_alias(__posix_lchown, lchown)
#endif /* defined(__minix) && defined(__weak_alias) && defined(_LIBC) */
int
lchown(const char *path, uid_t owner, gid_t group)
{