# HG changeset patch # User Matt Johnston # Date 1496415429 -28800 # Node ID 271c57aa3da538a7541ed00dc4b94c33c860b1a0 # Parent 1a3c4ec0f840fef90da7df9fafd5886fce80c3eb# Parent e7f11ed5fe28823b4753167b05f28f1e71684108 Merge pull request #31 from bengardner/PATH_DEVNULL Use DROPBEAR_PATH_DEVNULL instead of undefined _PATH_DEVNULL diff -r 1a3c4ec0f840 -r 271c57aa3da5 cli-session.c --- a/cli-session.c Sat May 20 10:27:29 2017 +0800 +++ b/cli-session.c Fri Jun 02 22:57:09 2017 +0800 @@ -287,7 +287,7 @@ int devnull; /* keeping stdin open steals input from the terminal and is confusing, though stdout/stderr could be useful. */ - devnull = open(_PATH_DEVNULL, O_RDONLY); + devnull = open(DROPBEAR_PATH_DEVNULL, O_RDONLY); if (devnull < 0) { dropbear_exit("Opening /dev/null: %d %s", errno, strerror(errno)); diff -r 1a3c4ec0f840 -r 271c57aa3da5 compat.c --- a/compat.c Sat May 20 10:27:29 2017 +0800 +++ b/compat.c Fri Jun 02 22:57:09 2017 +0800 @@ -174,7 +174,7 @@ if (!nochdir) (void)chdir("/"); - if (!noclose && (fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) { + if (!noclose && (fd = open(DROPBEAR_PATH_DEVNULL, O_RDWR, 0)) != -1) { (void)dup2(fd, STDIN_FILENO); (void)dup2(fd, STDOUT_FILENO); (void)dup2(fd, STDERR_FILENO); diff -r 1a3c4ec0f840 -r 271c57aa3da5 scpmisc.c --- a/scpmisc.c Sat May 20 10:27:29 2017 +0800 +++ b/scpmisc.c Fri Jun 02 22:57:09 2017 +0800 @@ -235,7 +235,7 @@ { int nullfd, dupfd; - if ((nullfd = dupfd = open(_PATH_DEVNULL, O_RDWR)) == -1) { + if ((nullfd = dupfd = open(DROPBEAR_PATH_DEVNULL, O_RDWR)) == -1) { fprintf(stderr, "Couldn't open /dev/null: %s", strerror(errno)); exit(1); }