2000-04-16 17:53:26 -04:00
|
|
|
$OpenBSD: patch-Wnn_jserver_de_c,v 1.1 2000/04/16 21:53:31 espie Exp $
|
|
|
|
--- Wnn/jserver/de.c.orig Fri Aug 19 03:31:23 1994
|
|
|
|
+++ Wnn/jserver/de.c Thu Apr 13 20:41:38 2000
|
|
|
|
@@ -65,6 +65,9 @@ extern int errno; /* Pure BSD */
|
1998-07-28 21:31:02 -04:00
|
|
|
|
|
|
|
#include <sys/ioctl.h>
|
|
|
|
|
|
|
|
+#if (defined(__unix__) || defined(unix)) && !defined(USG)
|
|
|
|
+#include <sys/param.h>
|
|
|
|
+#endif
|
|
|
|
#ifdef SYSVR2
|
|
|
|
#include <sys/param.h>
|
|
|
|
#ifndef SIGCHLD
|
2000-04-16 17:53:26 -04:00
|
|
|
@@ -264,7 +267,16 @@ char **argv;
|
1998-07-28 21:31:02 -04:00
|
|
|
fclose(stdin);
|
|
|
|
fclose(stdout);
|
|
|
|
if(!noisy){
|
|
|
|
+#if !(defined(BSD) && (BSD >= 199306)) /* !4.4BSD-Lite by Taoka */
|
|
|
|
fclose(stderr);
|
|
|
|
+#else /* 4.4BSD-Lite */
|
|
|
|
+ int fd = open("/dev/null", O_WRONLY);
|
|
|
|
+ if (fd < 0) {
|
|
|
|
+ xerror("Cannot open /dev/null\n");
|
|
|
|
+ }
|
|
|
|
+ dup2(fd, 2);
|
|
|
|
+ close(fd);
|
|
|
|
+#endif /* 4.4BSD-Lite */
|
|
|
|
}
|
|
|
|
|
|
|
|
#if defined(hpux) || defined(SOLARIS)
|