File: memcached_1.5.22.patch

package info (click to toggle)
ruby-dalli 5.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 992 kB
  • sloc: ruby: 9,447; sh: 19; makefile: 4
file content (48 lines) | stat: -rw-r--r-- 1,386 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
diff --git a/hash.c b/hash.c
index a0c3036..b5ff28a 100644
--- a/hash.c
+++ b/hash.c
@@ -4,6 +4,8 @@
 #include "jenkins_hash.h"
 #include "murmur3_hash.h"

+hash_func hash;
+
 int hash_init(enum hashfunc_type type) {
     switch(type) {
         case JENKINS_HASH:
diff --git a/hash.h b/hash.h
index 059d1e2..3b2a984 100644
--- a/hash.h
+++ b/hash.h
@@ -2,7 +2,7 @@
 #define    HASH_H

 typedef uint32_t (*hash_func)(const void *key, size_t length);
-hash_func hash;
+extern hash_func hash;

 enum hashfunc_type {
     JENKINS_HASH=0, MURMUR3_HASH
diff --git a/memcached.c b/memcached.c
index 3010236..0916f94 100644
--- a/memcached.c
+++ b/memcached.c
@@ -9528,7 +9528,7 @@ int main (int argc, char **argv) {
     /* daemonize if requested */
     /* if we want to ensure our ability to dump core, don't chdir to / */
     if (do_daemonize) {
-        if (sigignore(SIGHUP) == -1) {
+        if (signal(SIGHUP, SIG_IGN) == SIG_ERR) {
             perror("Failed to ignore SIGHUP");
         }
         if (daemonize(maxcore, settings.verbose) == -1) {
@@ -9677,7 +9677,7 @@ int main (int argc, char **argv) {
      * ignore SIGPIPE signals; we can use errno == EPIPE if we
      * need that information
      */
-    if (sigignore(SIGPIPE) == -1) {
+    if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) {
         perror("failed to ignore SIGPIPE; sigaction");
         exit(EX_OSERR);
     }