aboutsummaryrefslogtreecommitdiff
path: root/coreutils/tee.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/tee.c')
-rw-r--r--coreutils/tee.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/coreutils/tee.c b/coreutils/tee.c
index 48cc0508f..a0e177cbc 100644
--- a/coreutils/tee.c
+++ b/coreutils/tee.c
@@ -23,6 +23,7 @@
//usage: "Hello\n"
#include "libbb.h"
+#include "common_bufsiz.h"
int tee_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int tee_main(int argc, char **argv)
@@ -36,7 +37,8 @@ int tee_main(int argc, char **argv)
//TODO: make unconditional
#if ENABLE_FEATURE_TEE_USE_BLOCK_IO
ssize_t c;
-# define buf bb_common_bufsiz1
+# define buf bb_common_bufsiz1
+# define sizeof_buf COMMON_BUFSIZE
#else
int c;
#endif
@@ -79,7 +81,7 @@ int tee_main(int argc, char **argv)
/* names[0] will be filled later */
#if ENABLE_FEATURE_TEE_USE_BLOCK_IO
- while ((c = safe_read(STDIN_FILENO, buf, sizeof(buf))) > 0) {
+ while ((c = safe_read(STDIN_FILENO, buf, sizeof_buf)) > 0) {
fp = files;
do
fwrite(buf, 1, c, *fp);