mirror of
https://github.com/sheumann/hush.git
synced 2025-01-03 00:31:16 +00:00
move lchown/chown define out of specific files and into platform.h where it belongs
This commit is contained in:
parent
eea561871b
commit
8840759c61
@ -16,11 +16,6 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include "busybox.h"
|
#include "busybox.h"
|
||||||
|
|
||||||
/* Don't use lchown glibc older then 2.1.x */
|
|
||||||
#if (__GLIBC__ <= 2) && (__GLIBC_MINOR__ < 1)
|
|
||||||
#define lchown chown
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static int fileAction(const char *fileName, struct stat *statbuf, void* junk)
|
static int fileAction(const char *fileName, struct stat *statbuf, void* junk)
|
||||||
{
|
{
|
||||||
if (lchown(fileName, statbuf->st_uid, *((long *) junk)) == 0) {
|
if (lchown(fileName, statbuf->st_uid, *((long *) junk)) == 0) {
|
||||||
|
@ -171,7 +171,7 @@ typedef unsigned long long int uintmax_t;
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* uclibc does not implement daemon for no-mmu systems.
|
/* uclibc does not implement daemon() for no-mmu systems.
|
||||||
* For 0.9.29 and svn, __ARCH_USE_MMU__ indicates no-mmu reliably.
|
* For 0.9.29 and svn, __ARCH_USE_MMU__ indicates no-mmu reliably.
|
||||||
* For earlier versions there is no reliable way to check if we are building
|
* For earlier versions there is no reliable way to check if we are building
|
||||||
* for a mmu-less system; the user should pass EXTRA_CFLAGS="-DBB_NOMMU"
|
* for a mmu-less system; the user should pass EXTRA_CFLAGS="-DBB_NOMMU"
|
||||||
@ -187,6 +187,12 @@ typedef unsigned long long int uintmax_t;
|
|||||||
* out of the tree, so stop saying it should be. */
|
* out of the tree, so stop saying it should be. */
|
||||||
#define fdprintf dprintf
|
#define fdprintf dprintf
|
||||||
|
|
||||||
|
/* Don't use lchown with glibc older then 2.1.x ... uC-libc lacks it */
|
||||||
|
#if (defined __GLIBC__ && __GLIBC__ <= 2 && __GLIBC_MINOR__ < 1) || \
|
||||||
|
defined __UC_LIBC__
|
||||||
|
# define lchown chown
|
||||||
|
#endif
|
||||||
|
|
||||||
/* THIS SHOULD BE CLEANED OUT OF THE TREE ENTIRELY */
|
/* THIS SHOULD BE CLEANED OUT OF THE TREE ENTIRELY */
|
||||||
/* FIXME: fix tar.c! */
|
/* FIXME: fix tar.c! */
|
||||||
#ifndef FNM_LEADING_DIR
|
#ifndef FNM_LEADING_DIR
|
||||||
|
Loading…
Reference in New Issue
Block a user