summaryrefslogtreecommitdiff
path: root/usr.bin/talk
diff options
context:
space:
mode:
authorSheldon Hearn <sheldonh@FreeBSD.org>2001-07-26 11:02:39 +0000
committerSheldon Hearn <sheldonh@FreeBSD.org>2001-07-26 11:02:39 +0000
commite1b4d8d0746069292d84708b0e11b17a7e1ef5e0 (patch)
treebd2ac2627dbeab7d3427432bb98d2c73085b61c1 /usr.bin/talk
parent8155f5e200803441caa6e1bba5d9fa1f836d232f (diff)
downloadsrc-test2-e1b4d8d0746069292d84708b0e11b17a7e1ef5e0.tar.gz
src-test2-e1b4d8d0746069292d84708b0e11b17a7e1ef5e0.zip
Notes
Diffstat (limited to 'usr.bin/talk')
-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 40604e0105ef..4a6fd9e27f89 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)