diff options
Diffstat (limited to 'unixio.c')
-rw-r--r-- | unixio.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -39,6 +39,8 @@ and strip it from inbound characters. */ #include <stdio.h> +#include <stdlib.h> +#include <unistd.h> #include <sys/stat.h> #include <time.h> #include <errno.h> @@ -143,8 +145,8 @@ int pktmode(short on) { if (ttyfd < 0) /* Device must be open */ return(0); - system(on ? "stty raw -echo" : "stty sane"); /* Crude but effective */ - return(1); + return (system(on ? "stty raw -echo" : "stty sane") /* Crude but effective */ + ? 0 : 1); } |