about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/exec.c4
-rw-r--r--Src/prototypes.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/Src/exec.c b/Src/exec.c
index e4d1be03d..fcf00f28e 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -1278,7 +1278,7 @@ untokenize(char *s)
     }
 }
 
-/* Open a file for writing redicection */
+/* Open a file for writing redirection */
 
 /**/
 static int
@@ -2311,8 +2311,8 @@ execcmd(Estate state, int input, int output, int how, int last1)
     if (xtrerr != stderr) {
 	fil = fileno(xtrerr);
 	fclose(xtrerr);
-	zclose(fil);
 	xtrerr = stderr;
+	zclose(fil);
     }
 }
 
diff --git a/Src/prototypes.h b/Src/prototypes.h
index 1754c9b96..3b438ebed 100644
--- a/Src/prototypes.h
+++ b/Src/prototypes.h
@@ -66,7 +66,9 @@ char *mktemp _((char *));
 # ifndef HAVE_IOCTL_PROTO
 int ioctl _((int d, unsigned long request, void *argp));
 # endif
+# ifndef HAVE_MKNOD_PROTO
 int mknod _((const char *pathname, int mode, dev_t device));
+# endif
 int nice _((int increment));
 int select _((int nfds, fd_set * readfds, fd_set * writefds, fd_set * exceptfds, struct timeval *timeout));
 #endif