summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/004-strsignal.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/004-strsignal.patch')
-rw-r--r--meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/004-strsignal.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/004-strsignal.patch b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/004-strsignal.patch
new file mode 100644
index 0000000000..3ac4ed740c
--- /dev/null
+++ b/meta/recipes-devtools/unfs-server/unfs-server-2.2beta47/004-strsignal.patch
@@ -0,0 +1,48 @@
1# Patch origin: nfs-server source RPM from openSUSE 10.3
2
3--- nfs-server/failsafe.c 2002/11/07 17:12:46 1.1
4+++ nfs-server/failsafe.c 2002/11/07 17:15:16
5@@ -10,8 +10,12 @@
6 #include "logging.h"
7 #include "signals.h"
8 #include <sys/wait.h>
9+#ifdef HAVE_STRSIGNAL
10+#include <string.h>
11+#else
12
13 static const char * get_signame(int signo);
14+#endif
15
16 void
17 failsafe(int level, int ncopies)
18@@ -111,9 +115,17 @@
19 pid, running? "Continue" : "Exit");
20 } else {
21 Dprintf(L_WARNING, "failsafe: "
22+#ifdef HAVE_STRSIGNAL
23+ "child %d terminated by: %s. "
24+#else
25 "child %d terminated by %s. "
26+#endif
27 "Restarting.",
28+#ifdef HAVE_STRSIGNAL
29+ pid, strsignal(signo));
30+#else
31 pid, get_signame(signo));
32+#endif
33 child = -1; /* Restart */
34 }
35 } else if (WIFEXITED(status)) {
36@@ -159,6 +171,7 @@
37 /* NOP */
38 }
39
40+#ifndef HAVE_STRSIGNAL
41 static const char *
42 get_signame(int signo)
43 {
44@@ -199,3 +212,4 @@
45 sprintf(namebuf, "signal #%d", signo);
46 return namebuf;
47 }
48+#endif