aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2000-11-01 08:19:10 +0000
committerDaniel Stenberg <daniel@haxx.se>2000-11-01 08:19:10 +0000
commit852b664e450b15bff3b9d05e6fefcee78b86335e (patch)
tree0fc47ff019a9a273fce07a470565a7bc28b357ac /lib
parente6cdb68a88fac19f9c539d325a20fda7da220d04 (diff)
added signal in case sigaction is missing
Diffstat (limited to 'lib')
-rw-r--r--lib/url.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/url.c b/lib/url.c
index 76b8f4e8d..492192ed0 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -726,6 +726,12 @@ CURLcode curl_connect(CURL *curl, CURLconnect **in_connect)
sigact.sa_handler = alarmfunc;
sigact.sa_flags &= ~SA_RESTART;
sigaction(SIGALRM, &sigact, NULL);
+#else
+ /* no sigaction(), revert to the much lamer signal() */
+#ifdef HAVE_SIGNAL
+ signal(SIGALRM, alarmfunc);
+#endif
+
#endif
/* Parse <url> */