Mercurial > dropbear
changeset 1387:e7f11ed5fe28
Use DROPBEAR_PATH_DEVNULL instead of undefined _PATH_DEVNULL
author | Ben Gardner <bgardner@wabtec.com> |
---|---|
date | Tue, 24 May 2016 17:34:10 -0500 |
parents | 4fb9261ef02a |
children | 271c57aa3da5 |
files | cli-session.c compat.c scpmisc.c |
diffstat | 3 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/cli-session.c Thu May 12 23:47:35 2016 +0800 +++ b/cli-session.c Tue May 24 17:34:10 2016 -0500 @@ -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));
--- a/compat.c Thu May 12 23:47:35 2016 +0800 +++ b/compat.c Tue May 24 17:34:10 2016 -0500 @@ -177,7 +177,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);
--- a/scpmisc.c Thu May 12 23:47:35 2016 +0800 +++ b/scpmisc.c Tue May 24 17:34:10 2016 -0500 @@ -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); }