diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2010-09-01 19:09:11 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-09-01 19:09:57 +0100 |
commit | d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612 (patch) | |
tree | f36fe3008f36ff75cbdd31b630f8f13f1f205ebb /meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/restore_sigalarm.patch | |
parent | caab7fc509bf27706ff3248689f6afd04225cfda (diff) | |
download | poky-d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612.tar.gz |
packages: Separate out most of the remaining packages into recipes
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/restore_sigalarm.patch')
-rw-r--r-- | meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/restore_sigalarm.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/restore_sigalarm.patch b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/restore_sigalarm.patch new file mode 100644 index 0000000000..ece7da35fe --- /dev/null +++ b/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/restore_sigalarm.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | diff -ruN tcp_wrappers_7.6.orig/rfc931.c tcp_wrappers_7.6/rfc931.c | ||
2 | --- tcp_wrappers_7.6.orig/rfc931.c 2004-08-29 18:40:08.000000000 +0200 | ||
3 | +++ tcp_wrappers_7.6/rfc931.c 2004-08-29 18:40:02.000000000 +0200 | ||
4 | @@ -92,6 +92,8 @@ | ||
5 | char *cp; | ||
6 | char *result = unknown; | ||
7 | FILE *fp; | ||
8 | + unsigned saved_timeout; | ||
9 | + struct sigaction nact, oact; | ||
10 | |||
11 | #ifdef INET6 | ||
12 | /* address family must be the same */ | ||
13 | @@ -134,7 +136,12 @@ | ||
14 | */ | ||
15 | |||
16 | if (setjmp(timebuf) == 0) { | ||
17 | - signal(SIGALRM, timeout); | ||
18 | + /* Save SIGALRM timer and handler. Sudheer Abdul-Salam, SUN. */ | ||
19 | + saved_timeout = alarm(0); | ||
20 | + nact.sa_handler = timeout; | ||
21 | + nact.sa_flags = 0; | ||
22 | + (void) sigemptyset(&nact.sa_mask); | ||
23 | + (void) sigaction(SIGALRM, &nact, &oact); | ||
24 | alarm(rfc931_timeout); | ||
25 | |||
26 | /* | ||
27 | @@ -223,6 +230,10 @@ | ||
28 | } | ||
29 | alarm(0); | ||
30 | } | ||
31 | + /* Restore SIGALRM timer and handler. Sudheer Abdul-Salam, SUN. */ | ||
32 | + (void) sigaction(SIGALRM, &oact, NULL); | ||
33 | + if (saved_timeout > 0) | ||
34 | + alarm(saved_timeout); | ||
35 | fclose(fp); | ||
36 | } | ||
37 | STRN_CPY(dest, result, STRING_LENGTH); | ||