summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen2000-12-12 16:55:56 +0000
committerEric Andersen2000-12-12 16:55:56 +0000
commita2d61e761e66858d4d2d69f748756ad895efd139 (patch)
treeae9e85d1a6ae27e0acdeff9ed15a2d141a2de770
parent5ec241d3b38054c72735ff448dd1f9bebce78d3d (diff)
downloadbusybox-a2d61e761e66858d4d2d69f748756ad895efd139.zip
busybox-a2d61e761e66858d4d2d69f748756ad895efd139.tar.gz
Some compile fixes found by Larry Doolittle
-rw-r--r--Config.h2
-rwxr-xr-xapplets/busybox.sh1
-rwxr-xr-xbusybox.sh1
-rw-r--r--utility.c8
4 files changed, 7 insertions, 5 deletions
diff --git a/Config.h b/Config.h
index d95942a..1aa28a5 100644
--- a/Config.h
+++ b/Config.h
@@ -327,11 +327,11 @@
#endif
#endif
//
+#ifdef BB_TAR
#ifdef BB_FEATURE_TAR_GZIP
#ifndef BB_GUNZIP
#define BB_GUNZIP
#endif
-#endif
//
#if defined BB_MOUNT && defined BB_FEATURE_NFSMOUNT
#define BB_NFSMOUNT
diff --git a/applets/busybox.sh b/applets/busybox.sh
index 22493bf..6c91e53 100755
--- a/applets/busybox.sh
+++ b/applets/busybox.sh
@@ -5,6 +5,7 @@ RAW=` \
sed -n -e '/^.*BB_FEATURE.*$/d;s/^#define.*\<BB_\(.*\)\>/\1.c/gp;' \
| tr '[:upper:]' '[:lower:]' | sort
`
+test "${RAW}" != "" || exit
cd ${2:-.}
# I added in the extra "ls" so only source files that
# actually exist will show up in the compile list.
diff --git a/busybox.sh b/busybox.sh
index 22493bf..6c91e53 100755
--- a/busybox.sh
+++ b/busybox.sh
@@ -5,6 +5,7 @@ RAW=` \
sed -n -e '/^.*BB_FEATURE.*$/d;s/^#define.*\<BB_\(.*\)\>/\1.c/gp;' \
| tr '[:upper:]' '[:lower:]' | sort
`
+test "${RAW}" != "" || exit
cd ${2:-.}
# I added in the extra "ls" so only source files that
# actually exist will show up in the compile list.
diff --git a/utility.c b/utility.c
index 5dbe253..8796777 100644
--- a/utility.c
+++ b/utility.c
@@ -142,7 +142,7 @@ extern void perror_msg_and_die(const char *s, ...)
exit(EXIT_FAILURE);
}
-#if defined BB_INIT
+#if defined BB_INIT || defined BB_MKSWAP || defined BB_MOUNT
/* Returns kernel version encoded as major*65536 + minor*256 + patch,
* so, for example, to check if the kernel is greater than 2.2.11:
* if (get_kernel_revision() <= 2*65536+2*256+11) { <stuff> }
@@ -536,7 +536,7 @@ const char *time_string(time_t timeVal)
}
#endif /* BB_TAR || BB_AR */
-#if defined BB_TAR || defined BB_CP_MV || defined BB_AR
+#if defined BB_TAR || defined BB_CP_MV || defined BB_AR || defined BB_DD
/*
* Write all of the supplied buffer out to a file.
* This does multiple writes as necessary.
@@ -565,7 +565,7 @@ int full_write(int fd, const char *buf, int len)
#endif /* BB_TAR || BB_CP_MV || BB_AR */
-#if defined BB_TAR || defined BB_TAIL || defined BB_AR || defined BB_SH || defined BB_CP_MV
+#if defined BB_TAR || defined BB_TAIL || defined BB_AR || defined BB_SH || defined BB_CP_MV || defined BB_DD
/*
* Read all of the supplied buffer from a file.
* This does multiple reads as necessary.
@@ -866,7 +866,7 @@ extern int parse_mode(const char *s, mode_t * theMode)
#if defined BB_CHMOD_CHOWN_CHGRP || defined BB_PS || defined BB_LS \
|| defined BB_TAR || defined BB_ID || defined BB_LOGGER \
- || defined BB_LOGNAME || defined BB_WHOAMI
+ || defined BB_LOGNAME || defined BB_WHOAMI || defined BB_SH
/* This parses entries in /etc/passwd and /etc/group. This is desirable
* for BusyBox, since we want to avoid using the glibc NSS stuff, which