aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2008-11-17 19:08:35 +0000
committerYang Tse <yangsita@gmail.com>2008-11-17 19:08:35 +0000
commita15b6a6f86229de50f7622e23a6b19c040d3d4e1 (patch)
treedc93d77360b88ca4ba23482fe5592d5c06b92c3a /lib
parent20d3e2b9675d4158625e8e413e5c09f65cb80cab (diff)
the IP address we want/request/use from the interface is the 'local'
address, the one on the box libcurl is running, not the 'remote' one.
Diffstat (limited to 'lib')
-rw-r--r--lib/config-riscos.h3
-rw-r--r--lib/if2ip.c2
-rw-r--r--lib/if2ip.h1
-rw-r--r--lib/setup-os400.h3
4 files changed, 1 insertions, 8 deletions
diff --git a/lib/config-riscos.h b/lib/config-riscos.h
index 938a8fc3e..82d579e53 100644
--- a/lib/config-riscos.h
+++ b/lib/config-riscos.h
@@ -378,9 +378,6 @@
/* Define to `int' if <sys/types.h> does not define. */
#undef ssize_t
-/* this is a quick hack. I hope it's correct. */
-#define ifr_dstaddr ifr_addr
-
/* Define if you have the ioctl function. */
#define HAVE_IOCTL
diff --git a/lib/if2ip.c b/lib/if2ip.c
index 1c82373f1..842cd9947 100644
--- a/lib/if2ip.c
+++ b/lib/if2ip.c
@@ -137,7 +137,7 @@ char *Curl_if2ip(int af, const char *interface, char *buf, int buf_size)
else {
struct in_addr in;
- struct sockaddr_in *s = (struct sockaddr_in *)&req.ifr_dstaddr;
+ struct sockaddr_in *s = (struct sockaddr_in *)&req.ifr_addr;
memcpy(&in, &s->sin_addr, sizeof(in));
ip = (char *) Curl_inet_ntop(s->sin_family, &in, buf, buf_size);
}
diff --git a/lib/if2ip.h b/lib/if2ip.h
index 6888a4cb8..a7e341907 100644
--- a/lib/if2ip.h
+++ b/lib/if2ip.h
@@ -50,7 +50,6 @@ struct ifreq {
/* This define was added by Daniel to avoid an extra #ifdef INTERIX in the
C code. */
-#define ifr_dstaddr ifr_addr
#define ifr_name ifr_ifrn.ifrn_name /* interface name */
#define ifr_addr ifr_ifru.ifru_addr /* address */
diff --git a/lib/setup-os400.h b/lib/setup-os400.h
index 5efa6863b..eb51bc24c 100644
--- a/lib/setup-os400.h
+++ b/lib/setup-os400.h
@@ -30,9 +30,6 @@
/* OS/400 netdb.h does not define NI_MAXSERV. */
#define NI_MAXSERV 32
-/* OS/400 does not define the ifr_dstaddr union member. */
-#define ifr_dstaddr ifr_addr
-
/* No OS/400 header file defines u_int32_t. */
typedef unsigned long u_int32_t;