diff --git a/net/no-ip/Makefile b/net/no-ip/Makefile index a6cf7d98d2c..66df8a95850 100644 --- a/net/no-ip/Makefile +++ b/net/no-ip/Makefile @@ -1,8 +1,8 @@ -# $OpenBSD: Makefile,v 1.3 2003/05/07 08:33:19 wilfried Exp $ +# $OpenBSD: Makefile,v 1.4 2003/06/27 11:37:23 wilfried Exp $ COMMENT= "No-IP.com Dynamic DNS client" -V= 2.0.9 +V= 2.0.12 DISTNAME= noip-${V} PKGNAME= no-ip-${V} CATEGORIES= net diff --git a/net/no-ip/distinfo b/net/no-ip/distinfo index 13d27b14073..78e31b4816a 100644 --- a/net/no-ip/distinfo +++ b/net/no-ip/distinfo @@ -1,3 +1,3 @@ -MD5 (noip-2.0.9.tar.gz) = b58c840661ec4b38742715442435140f -RMD160 (noip-2.0.9.tar.gz) = 8bda3390b891b3d3a282b9dfc561d9fd4da2ee29 -SHA1 (noip-2.0.9.tar.gz) = 1c16405bfa6dccb96e5d3560376c13ee7da0ea57 +MD5 (noip-2.0.12.tar.gz) = 72053672a5125d39b861a130aa4532f1 +RMD160 (noip-2.0.12.tar.gz) = fb0df25deedfd07821c8a0588087bca53f229660 +SHA1 (noip-2.0.12.tar.gz) = 8151c12eb81804e666c0be4ccc22c7b7079309b1 diff --git a/net/no-ip/patches/patch-Makefile b/net/no-ip/patches/patch-Makefile index 42ce509b28c..aaa392abd09 100644 --- a/net/no-ip/patches/patch-Makefile +++ b/net/no-ip/patches/patch-Makefile @@ -1,25 +1,31 @@ -$OpenBSD: patch-Makefile,v 1.2 2003/05/07 08:33:19 wilfried Exp $ ---- Makefile.orig Fri Jan 17 00:33:22 2003 -+++ Makefile Tue Apr 1 17:05:23 2003 +$OpenBSD: patch-Makefile,v 1.3 2003/06/27 11:37:23 wilfried Exp $ +--- Makefile.orig Thu May 8 23:13:28 2003 ++++ Makefile Fri Jun 27 13:32:18 2003 @@ -1,5 +1,4 @@ TGT=noip2 -CC=gcc PREFIX=/usr/local CONFDIR=${PREFIX}/etc -@@ -7,14 +6,13 @@ BINDIR=${PREFIX}/bin +@@ -7,10 +6,10 @@ BINDIR=${PREFIX}/bin - # these defines are for linux and BSD + # these defines are for Linux LIBS= -ARCH=linux ++#ARCH=linux - # for solaris, uncomment the next two lines - # LIBS=-lsocket -lnsl + # for BSD systems that have getifaddr(), uncomment the next line +-#ARCH=bsd_with_getifaddrs ++ARCH=bsd_with_getifaddrs + + # for early BSD systems without getifaddrs(), uncomment the next line + #ARCH=bsd +@@ -21,7 +20,7 @@ ARCH=linux # ARCH=sun ${TGT}: Makefile ${TGT}.c - ${CC} -Wall -g -O2 -D${ARCH} -DPREFIX=\"${PREFIX}\" ${TGT}.c -o ${TGT} ${LIBS} -+ ${CC} -Wall -g -O2 -DPREFIX=\"${PREFIX}\" ${TGT}.c -o ${TGT} ${LIBS} ++ ${CC} ${CFLAGS} -D${ARCH} ${TGT}.c -o ${TGT} ${LIBS} install: ${TGT} - cp ${TGT} ${BINDIR}/${TGT} + if [ ! -d ${BINDIR} ]; then mkdir -p ${BINDIR};fi diff --git a/net/no-ip/patches/patch-noip2_c b/net/no-ip/patches/patch-noip2_c index 432454c591e..885e6af1221 100644 --- a/net/no-ip/patches/patch-noip2_c +++ b/net/no-ip/patches/patch-noip2_c @@ -1,18 +1,8 @@ -$OpenBSD: patch-noip2_c,v 1.1 2003/05/07 08:33:19 wilfried Exp $ ---- noip2.c.orig Sat Mar 8 16:56:04 2003 -+++ noip2.c Wed May 7 10:08:59 2003 -@@ -93,7 +93,8 @@ - #include - #include - #include -- -+#include -+#include - - #ifdef linux - #ifndef SIOCGIFADDR -@@ -153,11 +154,8 @@ - #define NOGROUP "@@NO_GROUP@@" +$OpenBSD: patch-noip2_c,v 1.2 2003/06/27 11:37:23 wilfried Exp $ +--- noip2.c.orig Sat May 24 00:55:14 2003 ++++ noip2.c Fri Jun 27 10:52:49 2003 +@@ -172,11 +172,8 @@ + #define NODNSGROUP "@@NO_GROUP@@" #define HOST 1 #define GROUP 2 -#ifndef PREFIX @@ -25,103 +15,3 @@ $OpenBSD: patch-noip2_c,v 1.1 2003/05/07 08:33:19 wilfried Exp $ #define CONFSTRLEN 1024 #define MAX_DEVLEN 16 #define MAX_INSTANCE 4 -@@ -657,7 +655,7 @@ void save_IP() - void getip(char *p, char *device) - { - int fd; -- int *x; -+ struct sockaddr_in *sin; - struct ifreq ifr; - struct in_addr z; - -@@ -684,8 +682,8 @@ void getip(char *p, char *device) - return; - } - close(fd); -- x = (int *)&ifr.ifr_addr; // seems to be off by 2 bytes -- z.s_addr = x[1]; -+ sin = (struct sockaddr_in *)&ifr.ifr_addr; -+ z = sin->sin_addr; - strcpy(p, inet_ntoa(z)); - #ifdef DEBUG - if (my_instance ? my_instance->debug : debug) -@@ -1376,7 +1374,7 @@ int dynamic_update() - if (my_instance ? my_instance->debug : debug) - Msg("Running %s %s %s", buffer, p, tbuf); - #endif -- execl(buffer, p, tbuf, NULL); -+ execl(buffer, p, tbuf, (void*)0); - Msg("execl %s failed (%s)", buffer, strerror(errno)); - exit(0); // bad execute -- don't care! - default: // parent -@@ -1832,45 +1830,36 @@ void get_credentials(char *l, char *p) - ///////////////////////////////////////////////////////////////////////////// - int get_all_device_names(unsigned char *devs) - { -- -- int fd, i, devnum=0; -- int num_ifreq; -+ int devnum=0; - unsigned char *p, *q, *dq; -- struct ifreq *pIfr; -- struct ifconf Ifc; -- static struct ifreq IfcBuf[MAX_NET_DEVS]; -- -- Ifc.ifc_len = sizeof(IfcBuf); -- Ifc.ifc_buf = (char *) IfcBuf; -- -- if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { -- perror("socket()"); -- exit(1); -+ struct ifaddrs *ifap, *ifa; -+ if (getifaddrs(&ifap) != 0) { -+ return 0; - } -- if (ioctl(fd, SIOCGIFCONF, &Ifc) < 0) { -- perror("ioctl SIOCGIFCONF"); -- exit(1); -- } -- num_ifreq = Ifc.ifc_len / sizeof(struct ifreq); - dq = devs; // add new name into list -- for (pIfr=Ifc.ifc_req,i=0; iifr_name; -- if (strcmp("lo", p) == 0) -- continue; -- if (strchr(p, ':') != NULL) -- continue; -- devnum++; -- while (*p) -- *q++ = *p++; -- *q = 0; -- if (devnum >= MAX_NET_DEVS) { -- Msg(CMSG23, MAX_NET_DEVS); -- exit(1); -- } -- dq += LINELEN; -+ for (ifa = ifap; ifa; ifa = ifa->ifa_next) { -+ if (ifa->ifa_addr->sa_family == AF_LINK) { -+ struct if_data *ifd = (struct if_data *) ifa->ifa_data; -+ if (ifd->ifi_type != IFT_ETHER) -+ continue; -+ q = dq; // add new name into list -+ p = ifa->ifa_name; -+ if (strcmp("lo", p) == 0) -+ continue; -+ devnum++; -+ while (*p) -+ *q++ = *p++; -+ *q = 0; -+ if (devnum >= MAX_NET_DEVS) { -+ Msg(CMSG23, MAX_NET_DEVS); -+ exit(1); -+ } -+ dq += LINELEN; -+ } - } -+ freeifaddrs(ifap); - return devnum; -+ - } - ///////////////////////////////////////////////////////////////////////////// - void get_device_name(char *d)