aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2019-03-12 14:41:49 +0000
committerRon Yorston <rmy@pobox.com>2019-03-12 14:41:49 +0000
commit0a058590010129557bdb9abd26d338297a21f10e (patch)
tree92a127d160a30824d2f9f191c8481d15e82e5984
parentfd0e6a01a68047e959ef13f3161ce302b438d2b1 (diff)
downloadbusybox-w32-0a058590010129557bdb9abd26d338297a21f10e.tar.gz
busybox-w32-0a058590010129557bdb9abd26d338297a21f10e.tar.bz2
busybox-w32-0a058590010129557bdb9abd26d338297a21f10e.zip
win32: fix POSIX build (again)
Some faulty logic with ENABLE_FEATURE_EXTRA_FILE_DATA broke the POSIX build.
-rw-r--r--archival/tar.c4
-rw-r--r--editors/diff.c4
-rw-r--r--libbb/copy_file.c4
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
535 * the new tarball */ 535 * the new tarball */
536 if (tbInfo->tarFileStatBuf.st_dev == statbuf->st_dev 536 if (tbInfo->tarFileStatBuf.st_dev == statbuf->st_dev
537 && tbInfo->tarFileStatBuf.st_ino == statbuf->st_ino 537 && tbInfo->tarFileStatBuf.st_ino == statbuf->st_ino
538# if ENABLE_FEATURE_EXTRA_FILE_DATA
538 /* ignore invalid inode numbers */ 539 /* ignore invalid inode numbers */
539 && (ENABLE_FEATURE_EXTRA_FILE_DATA && statbuf->st_ino != 0) 540 && statbuf->st_ino != 0
541# endif
540 ) { 542 ) {
541 bb_error_msg("%s: file is the archive; skipping", fileName); 543 bb_error_msg("%s: file is the archive; skipping", fileName);
542 return TRUE; 544 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)
1041 */ 1041 */
1042 if (ENABLE_DESKTOP 1042 if (ENABLE_DESKTOP
1043 && (ENABLE_PLATFORM_POSIX || ENABLE_FEATURE_EXTRA_FILE_DATA) 1043 && (ENABLE_PLATFORM_POSIX || ENABLE_FEATURE_EXTRA_FILE_DATA)
1044#if ENABLE_FEATURE_EXTRA_FILE_DATA
1044 /* ignore invalid inode numbers */ 1045 /* ignore invalid inode numbers */
1045 && (ENABLE_FEATURE_EXTRA_FILE_DATA && stb[0].st_ino != 0) 1046 && stb[0].st_ino != 0
1047#endif
1046 && stb[0].st_ino == stb[1].st_ino 1048 && stb[0].st_ino == stb[1].st_ino
1047 && stb[0].st_dev == stb[1].st_dev 1049 && stb[0].st_dev == stb[1].st_dev
1048 && stb[0].st_size == stb[1].st_size 1050 && 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)
108#if ENABLE_PLATFORM_POSIX || ENABLE_FEATURE_EXTRA_FILE_DATA 108#if ENABLE_PLATFORM_POSIX || ENABLE_FEATURE_EXTRA_FILE_DATA
109 if (source_stat.st_dev == dest_stat.st_dev 109 if (source_stat.st_dev == dest_stat.st_dev
110 && source_stat.st_ino == dest_stat.st_ino 110 && source_stat.st_ino == dest_stat.st_ino
111# if ENABLE_FEATURE_EXTRA_FILE_DATA
111 /* ignore invalid inode numbers */ 112 /* ignore invalid inode numbers */
112 && (ENABLE_FEATURE_EXTRA_FILE_DATA && source_stat.st_ino != 0) 113 && source_stat.st_ino != 0
114# endif
113 ) { 115 ) {
114 bb_error_msg("'%s' and '%s' are the same file", source, dest); 116 bb_error_msg("'%s' and '%s' are the same file", source, dest);
115 return -1; 117 return -1;