From e4f28beec255ea2e233e0f016d4795d13a24bfae Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Tue, 26 Mar 2013 13:53:03 +0000 Subject: Provide fake fchmod implementation --- coreutils/dos2unix.c | 2 +- include/mingw.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/coreutils/dos2unix.c b/coreutils/dos2unix.c index e1fbe8538..07398bdfa 100644 --- a/coreutils/dos2unix.c +++ b/coreutils/dos2unix.c @@ -58,7 +58,7 @@ static void convert(char *fn, int conv_type) temp_fn = xasprintf("%sXXXXXX", resolved_fn); i = xmkstemp(temp_fn); - if (!ENABLE_PLATFORM_MINGW32 && fchmod(i, st.st_mode) == -1) + if (fchmod(i, st.st_mode) == -1) bb_simple_perror_msg_and_die(temp_fn); out = xfdopen_for_write(i); diff --git a/include/mingw.h b/include/mingw.h index b39fcae3d..577e48a2a 100644 --- a/include/mingw.h +++ b/include/mingw.h @@ -228,7 +228,7 @@ typedef int nlink_t; #define S_IWOTH (S_IWGRP >> 3) #define S_IXOTH (S_IXGRP >> 3) -NOIMPL(fchmod,int fildes UNUSED_PARAM, mode_t mode UNUSED_PARAM); +IMPL(fchmod,int,0,int fildes UNUSED_PARAM, mode_t mode UNUSED_PARAM); NOIMPL(fchown,int fd UNUSED_PARAM, uid_t uid UNUSED_PARAM, gid_t gid UNUSED_PARAM); int mingw_mkdir(const char *path, int mode); #define mkdir mingw_mkdir -- cgit v1.2.3-55-g6feb