1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

VMS adjustments. The IOCTL_3_ARGS #define used now should be moved to become

a configure checked one.
This commit is contained in:
Daniel Stenberg 2001-08-06 12:22:48 +00:00
parent 6f543f3ede
commit 5b6640960a

View File

@ -66,6 +66,11 @@
#include "inet_ntoa_r.h" #include "inet_ntoa_r.h"
#endif #endif
#ifdef VMS
#define IOCTL_3_ARGS
#include <inet.h>
#endif
/* The last #include file should be: */ /* The last #include file should be: */
#ifdef MALLOCDEBUG #ifdef MALLOCDEBUG
#include "memdebug.h" #include "memdebug.h"
@ -90,7 +95,11 @@ char *Curl_if2ip(char *interface, char *buf, int buf_size)
memset(&req, 0, sizeof(req)); memset(&req, 0, sizeof(req));
strcpy(req.ifr_name, interface); strcpy(req.ifr_name, interface);
req.ifr_addr.sa_family = AF_INET; req.ifr_addr.sa_family = AF_INET;
#ifdef IOCTL_3_ARGS
if (SYS_ERROR == ioctl(dummy, SIOCGIFADDR, &req)) {
#else
if (SYS_ERROR == ioctl(dummy, SIOCGIFADDR, &req, sizeof(req))) { if (SYS_ERROR == ioctl(dummy, SIOCGIFADDR, &req, sizeof(req))) {
#endif
sclose(dummy); sclose(dummy);
return NULL; return NULL;
} }