]> granicus.if.org Git - curl/commitdiff
VMS adjustments. The IOCTL_3_ARGS #define used now should be moved to become
authorDaniel Stenberg <daniel@haxx.se>
Mon, 6 Aug 2001 12:22:48 +0000 (12:22 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 6 Aug 2001 12:22:48 +0000 (12:22 +0000)
a configure checked one.

lib/if2ip.c

index 1e6a88f0d5a91d45e9f4f4003c0bff6ac070fbbc..261de990a19805d5f5241ea46871f205e44f5a1b 100644 (file)
 #include "inet_ntoa_r.h"
 #endif
 
+#ifdef VMS
+#define        IOCTL_3_ARGS
+#include <inet.h>
+#endif
+
 /* The last #include file should be: */
 #ifdef MALLOCDEBUG
 #include "memdebug.h"
@@ -90,7 +95,11 @@ char *Curl_if2ip(char *interface, char *buf, int buf_size)
     memset(&req, 0, sizeof(req));
     strcpy(req.ifr_name, interface);
     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))) {
+#endif
       sclose(dummy);
       return NULL;
     }