Header cleanup on two more networking files (move libbb.h to the top and
[oweals/busybox.git] / miscutils / rx.c
index ef372d383b92f5ad211af14c5ea8787a6d3f4ea3..7642094b7855976085a88ad9c12846db1a7d31a5 100644 (file)
@@ -20,6 +20,7 @@
  *
  */
 
+#include "busybox.h"
 #include <stdlib.h>
 #include <stdarg.h>
 #include <stdio.h>
@@ -31,7 +32,6 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <string.h>
-#include "busybox.h"
 
 
 #define SOH 0x01
@@ -290,7 +290,7 @@ int rx_main(int argc, char **argv)
                        bb_show_usage();
 
        fn = argv[1];
-       ttyfd = bb_xopen3("/dev/tty", O_RDWR, 0);
+       ttyfd = bb_xopen3(CURRENT_TTY, O_RDWR, 0);
        filefd = bb_xopen3(fn, O_RDWR|O_CREAT|O_TRUNC, 0666);
 
        if (tcgetattr(ttyfd, &tty) < 0)