aboutsummaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>1999-11-19 02:38:58 +0000
committerEric Andersen <andersen@codepoet.org>1999-11-19 02:38:58 +0000
commit08b1034f4f0b910660a8b1a537f86462fa41ebad (patch)
tree4a39b721f4654120bff47fcd7cd95906172ec16f /archival
parentab746abfc05c28824b25e12b86a538b09fb9275d (diff)
downloadbusybox-08b1034f4f0b910660a8b1a537f86462fa41ebad.tar.gz
Stuf
Diffstat (limited to 'archival')
-rw-r--r--archival/tar.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/archival/tar.c b/archival/tar.c
index 1fdbf8c1c..bbd86628a 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -38,6 +38,7 @@
#include <signal.h>
#include <time.h>
#include <sys/types.h>
+#include <sys/sysmacros.h>
static const char tar_usage[] =
@@ -276,7 +277,7 @@ static void readTarFile (int fileCount, char **fileTable)
* Open the tar file for reading.
*/
if ((tarName == NULL) || !strcmp (tarName, "-")) {
- tarFd = STDIN;
+ tarFd = fileno(stdin);
} else
tarFd = open (tarName, O_RDONLY);
@@ -552,7 +553,7 @@ readHeader (const TarHeader * hp, int fileCount, char **fileTable)
* Start the output file.
*/
if (tostdoutFlag == TRUE)
- outFd = STDOUT;
+ outFd = fileno(stdout);
else {
if ( S_ISCHR(mode) || S_ISBLK(mode) || S_ISSOCK(mode) ) {
devFileFlag = TRUE;
@@ -650,7 +651,7 @@ static void writeTarFile (int fileCount, char **fileTable)
*/
if ((tarName == NULL) || !strcmp (tarName, "-")) {
tostdoutFlag = TRUE;
- tarFd = STDOUT;
+ tarFd = fileno(stdout);
} else
tarFd = open (tarName, O_WRONLY | O_CREAT | O_TRUNC, 0666);