aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2006-08-16 18:48:27 +0000
committerDan Fandrich <dan@coneharvesters.com>2006-08-16 18:48:27 +0000
commit839441e236764996425fe768e9497b1f914cea3e (patch)
treef75970d7e57d44104b523545d496b0b80180d140 /lib
parentba9ea943e2e11a6131832937551f1768c8f52d9b (diff)
Minor portability fixes to get things running on UNICOS 9.0 on a Cray Y-MP
Diffstat (limited to 'lib')
-rw-r--r--lib/hostip.c10
-rw-r--r--lib/if2ip.c2
2 files changed, 7 insertions, 5 deletions
diff --git a/lib/hostip.c b/lib/hostip.c
index a21613061..fc2513cc2 100644
--- a/lib/hostip.c
+++ b/lib/hostip.c
@@ -409,10 +409,12 @@ int Curl_resolv(struct connectdata *conn,
#ifdef HAVE_SIGSETJMP
/* this allows us to time-out from the name resolver, as the timeout
will generate a signal and we will siglongjmp() from that here */
- if(!data->set.no_signal && sigsetjmp(curl_jmpenv, 1)) {
- /* this is coming from a siglongjmp() */
- failf(data, "name lookup timed out");
- return CURLRESOLV_ERROR;
+ if(!data->set.no_signal) {
+ if (sigsetjmp(curl_jmpenv, 1)) {
+ /* this is coming from a siglongjmp() */
+ failf(data, "name lookup timed out");
+ return CURLRESOLV_ERROR;
+ }
}
#endif
diff --git a/lib/if2ip.c b/lib/if2ip.c
index f3d31bc1d..fadf51474 100644
--- a/lib/if2ip.c
+++ b/lib/if2ip.c
@@ -114,7 +114,7 @@ char *Curl_if2ip(const char *interface, char *buf, int buf_size)
struct in_addr in;
struct sockaddr_in *s = (struct sockaddr_in *)&req.ifr_dstaddr;
- memcpy(&in, &(s->sin_addr.s_addr), sizeof(in));
+ memcpy(&in, &s->sin_addr, sizeof(in));
ip = (char *) Curl_inet_ntop(s->sin_family, &in, buf, buf_size);
}
sclose(dummy);