diff options
author | Khem Raj <raj.khem@gmail.com> | 2009-03-05 16:32:00 -0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2009-03-05 16:32:00 -0800 |
commit | b7ce9179e07a5eef3df653c4830192f10868aa34 (patch) | |
tree | c17be8211e7fc5773cb041cdf1666b6ef092a353 /packages/gnutls | |
parent | 29839e2c84c15d64f0c422cf504da2ac2f943393 (diff) |
gnutls-2.4.2: Get rid of siginterrupt () call.
util-linux-ng-2.14: Ditto
* siginterrupt () is SUSV4 function which is
better to be replaced by sigaction as suggested
by standard. Below is from http://www.opengroup.org/onlinepubs/9699919799/
The siginterrupt() function supports programs written to historical system
interfaces. Applications should use the sigaction() with the SA_RESTART
flag instead of the obsolescent siginterrupt() function.
Diffstat (limited to 'packages/gnutls')
-rw-r--r-- | packages/gnutls/gnutls-2.4.2/gnutls-replace-siginterrupt.patch | 37 | ||||
-rw-r--r-- | packages/gnutls/gnutls_2.4.2.bb | 3 |
2 files changed, 39 insertions, 1 deletions
diff --git a/packages/gnutls/gnutls-2.4.2/gnutls-replace-siginterrupt.patch b/packages/gnutls/gnutls-2.4.2/gnutls-replace-siginterrupt.patch new file mode 100644 index 0000000000..9b734a9bf9 --- /dev/null +++ b/packages/gnutls/gnutls-2.4.2/gnutls-replace-siginterrupt.patch @@ -0,0 +1,37 @@ +Index: gnutls-2.4.2/src/tests.c +=================================================================== +--- gnutls-2.4.2.orig/src/tests.c 2008-09-15 13:04:19.000000000 -0700 ++++ gnutls-2.4.2/src/tests.c 2009-03-04 15:25:09.000000000 -0800 +@@ -491,6 +491,7 @@ + int old, secs = 6; + + #ifndef _WIN32 ++ struct sigaction act; + signal (SIGALRM, got_alarm); + #endif + +@@ -511,7 +512,9 @@ + return TEST_FAILED; + + #ifndef _WIN32 +- old = siginterrupt (SIGALRM, 1); ++ (void) sigaction(SIGALRM, NULL, &act); ++ act.sa_flags &= ~SA_RESTART; ++ old = sigaction(SIGALRM, &act, NULL); + alarm (secs); + #else + setsockopt ((int)gnutls_transport_get_ptr (session), SOL_SOCKET, SO_RCVTIMEO, +@@ -525,7 +528,12 @@ + while (ret > 0); + + #ifndef _WIN32 +- siginterrupt (SIGALRM, old); ++ (void) sigaction(SIGALRM, NULL, &act); ++ if (old) ++ act.sa_flags &= ~SA_RESTART; ++ else ++ act.sa_flags |= SA_RESTART; ++ sigaction(SIGALRM, &act, NULL); + #else + if (WSAGetLastError () == WSAETIMEDOUT || + WSAGetLastError () == WSAECONNABORTED) diff --git a/packages/gnutls/gnutls_2.4.2.bb b/packages/gnutls/gnutls_2.4.2.bb index ddaef1dea3..d33e687741 100644 --- a/packages/gnutls/gnutls_2.4.2.bb +++ b/packages/gnutls/gnutls_2.4.2.bb @@ -4,6 +4,7 @@ SRC_URI += "\ file://gnutls-openssl.patch;patch=1 \ file://gnutls-texinfo-euro.patch;patch=1 \ file://configure_madness.patch;patch=1 \ + file://gnutls-replace-siginterrupt.patch;patch=1 \ " -PR = "r3" +PR = "r4" |