summaryrefslogtreecommitdiffstats
path: root/usr.bin/talk/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/talk/io.c')
-rw-r--r--usr.bin/talk/io.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/talk/io.c b/usr.bin/talk/io.c
index 40604e0..4a6fd9e 100644
--- a/usr.bin/talk/io.c
+++ b/usr.bin/talk/io.c
@@ -48,6 +48,7 @@ static const char rcsid[] =
#include <errno.h>
#include <string.h>
#include <sys/filio.h>
+#include <unistd.h>
#include "talk.h"
#define A_LONG_TIME 10000000
@@ -105,7 +106,7 @@ talk()
*/
int i;
ioctl(0, FIONREAD, (struct sgttyb *) &nb);
- nb = read(0, buf, nb);
+ nb = read(STDIN_FILENO, buf, nb);
display(&my_win, buf, nb);
/* might lose data here because sockt is non-blocking */
for (i = 0; i < nb; ++i)
OpenPOWER on IntegriCloud