aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/hostip.h14
-rw-r--r--lib/url.c4
2 files changed, 12 insertions, 6 deletions
diff --git a/lib/hostip.h b/lib/hostip.h
index d37203cc5..c6172be0f 100644
--- a/lib/hostip.h
+++ b/lib/hostip.h
@@ -26,6 +26,10 @@
#include "setup.h"
#include "hash.h"
+#ifdef HAVE_SETJMP_H
+#include <setjmp.h>
+#endif
+
#ifdef NETWARE
#undef in_addr_t
#define in_addr_t unsigned long
@@ -287,7 +291,13 @@ void Curl_destroy_thread_data(struct Curl_async *async);
#define CURL_INADDR_NONE INADDR_NONE
#endif
-
-
+#ifdef HAVE_SIGSETJMP
+/* Forward-declaration of variable defined in hostip.c. Beware this
+ * is a global and unique instance. This is used to store the return
+ * address that we can jump back to from inside a signal handler.
+ * This is not thread-safe stuff.
+ */
+extern sigjmp_buf curl_jmpenv;
+#endif
#endif
diff --git a/lib/url.c b/lib/url.c
index a79ab9d78..15c5cc7a4 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -184,10 +184,6 @@ static void flush_cookies(struct SessionHandle *data, int cleanup);
#ifndef WIN32
/* not for WIN32 builds */
-#ifdef HAVE_SIGSETJMP
-extern sigjmp_buf curl_jmpenv;
-#endif
-
#ifdef SIGALRM
static
RETSIGTYPE alarmfunc(int sig)