aboutsummaryrefslogtreecommitdiffstats
path: root/x11-wm/epplets
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2003-12-08 08:19:58 +0800
committerpav <pav@FreeBSD.org>2003-12-08 08:19:58 +0800
commit4aaeb0d59689107a717196cf14c0afe9f1121c80 (patch)
tree8c15d22a4b4524b0f2c119afecd7c2b4b31431db /x11-wm/epplets
parent2edca92288e0b88911b01225210be5cd859bf9b4 (diff)
downloadfreebsd-ports-gnome-4aaeb0d59689107a717196cf14c0afe9f1121c80.tar.gz
freebsd-ports-gnome-4aaeb0d59689107a717196cf14c0afe9f1121c80.tar.zst
freebsd-ports-gnome-4aaeb0d59689107a717196cf14c0afe9f1121c80.zip
- Fix build in post if_xname world
- Pet portlint PR: ports/59452 Submitted by: brooks
Diffstat (limited to 'x11-wm/epplets')
-rw-r--r--x11-wm/epplets/Makefile1
-rw-r--r--x11-wm/epplets/files/patch-an25
2 files changed, 17 insertions, 9 deletions
diff --git a/x11-wm/epplets/Makefile b/x11-wm/epplets/Makefile
index 0eb06b912a84..36dd2ba486fa 100644
--- a/x11-wm/epplets/Makefile
+++ b/x11-wm/epplets/Makefile
@@ -11,7 +11,6 @@ PORTREVISION= 1
CATEGORIES= x11-wm
MASTER_SITES= ftp://kde.planetmirror.com/pub/enlightenment/epplets/ \
ftp://ftp.dti.ad.jp/pub/X/enlightenment/epplets/
-
DISTNAME= epplet-base-${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
diff --git a/x11-wm/epplets/files/patch-an b/x11-wm/epplets/files/patch-an
index 4585f1885d48..709c13c821fb 100644
--- a/x11-wm/epplets/files/patch-an
+++ b/x11-wm/epplets/files/patch-an
@@ -1,6 +1,6 @@
---- epplets/net.c.orig Tue Jul 31 23:50:29 2001
-+++ epplets/net.c Fri Aug 10 14:54:32 2001
-@@ -35,6 +35,22 @@
+--- epplets/net.c.orig Wed Dec 22 02:52:54 1999
++++ epplets/net.c Tue Nov 18 22:57:45 2003
+@@ -35,6 +35,23 @@
# include <kstat.h>
# include <sys/sysinfo.h>
#endif
@@ -9,6 +9,7 @@
+
+#include <sys/types.h>
+#include <sys/socket.h>
++#include <sys/param.h>
+
+#include <net/if.h>
+#include <net/if_var.h>
@@ -23,7 +24,7 @@
#include "epplet.h"
#include "net.h"
-@@ -51,6 +67,18 @@
+@@ -51,6 +68,18 @@
char buff[256], **names = NULL, *s;
unsigned long i;
@@ -42,7 +43,7 @@
names = (char **) malloc(sizeof(char *));
memset(names, 0, sizeof(char *));
-@@ -80,6 +108,66 @@
+@@ -80,6 +109,70 @@
return (names);
#elif defined(__sun__)
return ((char **) NULL);
@@ -80,6 +81,7 @@
+ num = 0;
+ while(ifnetaddr)
+ {
++#if __FreeBSD_version < 501113
+ if(kvm_read(kd, ifnetaddr, &ifnet, sizeof(ifnet)) == -1 ||
+ kvm_read(kd, (long)ifnet.if_name, type, 16) == -1)
+ {
@@ -90,6 +92,9 @@
+ ifnetaddr = (unsigned long)TAILQ_NEXT(&ifnet, if_link);
+
+ snprintf(name, 32, "%s%d", type, ifnet.if_unit);
++#else
++ strlcpy(name, ifnet.if_xname, sizeof(name));
++#endif
+
+ if((names = (char **)realloc(names, (++num + 1)*sizeof(char *))) == NULL)
+ return NULL;
@@ -109,7 +114,7 @@
#else
return ((char **) NULL);
#endif
-@@ -97,6 +185,21 @@
+@@ -97,6 +190,21 @@
unsigned char match = 0;
FILE *fp;
char buff[256], *colon = NULL, dev[64], in_str[64], out_str[64];
@@ -131,7 +136,7 @@
#endif
if (device == NULL) {
-@@ -151,6 +254,104 @@
+@@ -151,6 +259,108 @@
}
fclose(fp);
return ((match) ? (0) : (ENODEV));
@@ -172,6 +177,7 @@
+ if(ifaddraddr == 0)
+ {
+ ifnetfound = ifnetaddr;
++#if __FreeBSD_version < 501113
+ if(kvm_read(kd, ifnetaddr, &ifnet, sizeof(ifnet)) == -1 ||
+ kvm_read(kd, (long)ifnet.if_name, tname, 16) == -1)
+ {
@@ -181,8 +187,11 @@
+ }
+
+ tname[15] = '\0';
-+ ifnetaddr = (unsigned long)TAILQ_NEXT(&ifnet, if_link);
+ snprintf(name, 32, "%s%d", tname, ifnet.if_unit);
++#else
++ strlcpy(name, ifnet.if_xname, sizeof(name));
++#endif
++ ifnetaddr = (unsigned long)TAILQ_NEXT(&ifnet, if_link);
+
+ if(strncasecmp(name, device, 16) != 0)
+ continue;