From 0a058590010129557bdb9abd26d338297a21f10e Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Tue, 12 Mar 2019 14:41:49 +0000 Subject: win32: fix POSIX build (again) Some faulty logic with ENABLE_FEATURE_EXTRA_FILE_DATA broke the POSIX build. --- archival/tar.c | 4 +++- editors/diff.c | 4 +++- libbb/copy_file.c | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/archival/tar.c b/archival/tar.c index 3375d1fe9..54961ff07 100644 --- a/archival/tar.c +++ b/archival/tar.c @@ -535,8 +535,10 @@ static int FAST_FUNC writeFileToTarball(const char *fileName, struct stat *statb * the new tarball */ if (tbInfo->tarFileStatBuf.st_dev == statbuf->st_dev && tbInfo->tarFileStatBuf.st_ino == statbuf->st_ino +# if ENABLE_FEATURE_EXTRA_FILE_DATA /* ignore invalid inode numbers */ - && (ENABLE_FEATURE_EXTRA_FILE_DATA && statbuf->st_ino != 0) + && statbuf->st_ino != 0 +# endif ) { bb_error_msg("%s: file is the archive; skipping", fileName); return TRUE; diff --git a/editors/diff.c b/editors/diff.c index 308d9782b..cf531460f 100644 --- a/editors/diff.c +++ b/editors/diff.c @@ -1041,8 +1041,10 @@ int diff_main(int argc UNUSED_PARAM, char **argv) */ if (ENABLE_DESKTOP && (ENABLE_PLATFORM_POSIX || ENABLE_FEATURE_EXTRA_FILE_DATA) +#if ENABLE_FEATURE_EXTRA_FILE_DATA /* ignore invalid inode numbers */ - && (ENABLE_FEATURE_EXTRA_FILE_DATA && stb[0].st_ino != 0) + && stb[0].st_ino != 0 +#endif && stb[0].st_ino == stb[1].st_ino && stb[0].st_dev == stb[1].st_dev && stb[0].st_size == stb[1].st_size diff --git a/libbb/copy_file.c b/libbb/copy_file.c index abe034f50..1dc515b07 100644 --- a/libbb/copy_file.c +++ b/libbb/copy_file.c @@ -108,8 +108,10 @@ int FAST_FUNC copy_file(const char *source, const char *dest, int flags) #if ENABLE_PLATFORM_POSIX || ENABLE_FEATURE_EXTRA_FILE_DATA if (source_stat.st_dev == dest_stat.st_dev && source_stat.st_ino == dest_stat.st_ino +# if ENABLE_FEATURE_EXTRA_FILE_DATA /* ignore invalid inode numbers */ - && (ENABLE_FEATURE_EXTRA_FILE_DATA && source_stat.st_ino != 0) + && source_stat.st_ino != 0 +# endif ) { bb_error_msg("'%s' and '%s' are the same file", source, dest); return -1; -- cgit v1.2.3-55-g6feb