Workaround missing lchmod/lchown
Change-Id: I231a0010722619d389b763af35ff55f84ca9cb76
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user