aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorperky <perky@FreeBSD.org>2004-12-05 22:08:12 +0800
committerperky <perky@FreeBSD.org>2004-12-05 22:08:12 +0800
commitad6673589cb058c400eb8c69a1afa3050101b253 (patch)
treea12e6af9721ac4faab29af7125e25dba81236db7 /devel
parent2770b7d4b9fad40aa8fe1e1e082a31941201085b (diff)
downloadfreebsd-ports-gnome-ad6673589cb058c400eb8c69a1afa3050101b253.tar.gz
freebsd-ports-gnome-ad6673589cb058c400eb8c69a1afa3050101b253.tar.zst
freebsd-ports-gnome-ad6673589cb058c400eb8c69a1afa3050101b253.zip
Fix build on 5 and 6.
Submitted by: Michal Suszko <Michal@dry.pl>
Diffstat (limited to 'devel')
-rw-r--r--devel/py-freebsd/Makefile8
-rw-r--r--devel/py-freebsd/files/patch-src::netstat.c48
2 files changed, 49 insertions, 7 deletions
diff --git a/devel/py-freebsd/Makefile b/devel/py-freebsd/Makefile
index 031ee4c1651d..dd65b9e001fb 100644
--- a/devel/py-freebsd/Makefile
+++ b/devel/py-freebsd/Makefile
@@ -20,10 +20,4 @@ PLIST_FILES= lib/%%PYTHON_VERSION%%/site-packages/freebsd.so
USE_PYTHON= yes
USE_PYDISTUTILS= yes
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} >= 502126
-BROKEN= "Does not compile on FreeBSD >= 5.x"
-.endif
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/devel/py-freebsd/files/patch-src::netstat.c b/devel/py-freebsd/files/patch-src::netstat.c
new file mode 100644
index 000000000000..b28ec112bdd7
--- /dev/null
+++ b/devel/py-freebsd/files/patch-src::netstat.c
@@ -0,0 +1,48 @@
+--- src/netstat.c.orig Sun Dec 5 10:58:17 2004
++++ src/netstat.c Sun Dec 5 10:55:25 2004
+@@ -71,7 +71,7 @@
+ size_t len = sizeof ipstat;
+ PyObject *r, *t;
+
+- if (sysctlbyname("net.inet.ip.stats", &ipstat, &len, NULL, NULL) < 0) {
++ if (sysctlbyname("net.inet.ip.stats", &ipstat, &len, NULL, 0) < 0) {
+ PyErr_SetFromErrno(PyExc_OSError);
+ return Py_None;
+ }
+@@ -114,7 +114,7 @@
+ size_t len = sizeof tcpstat;
+ PyObject *r, *t;
+
+- if (sysctlbyname("net.inet.tcp.stats", &tcpstat, &len, NULL, NULL) < 0) {
++ if (sysctlbyname("net.inet.tcp.stats", &tcpstat, &len, NULL, 0) < 0) {
+ PyErr_SetFromErrno(PyExc_OSError);
+ return Py_None;
+ }
+@@ -166,7 +166,7 @@
+ size_t len = sizeof udpstat;
+ PyObject *r, *t;
+
+- if (sysctlbyname("net.inet.udp.stats", &udpstat, &len, NULL, NULL) < 0) {
++ if (sysctlbyname("net.inet.udp.stats", &udpstat, &len, NULL, 0) < 0) {
+ PyErr_SetFromErrno(PyExc_OSError);
+ return Py_None;
+ }
+@@ -218,7 +218,7 @@
+ PyObject *r, *d, *t;
+
+ len = sizeof value;
+- if (sysctlbyname("net.link.generic.system.ifcount", &value, &len, NULL, NULL) < 0) {
++ if (sysctlbyname("net.link.generic.system.ifcount", &value, &len, NULL, 0) < 0) {
+ PyErr_SetFromErrno(PyExc_OSError);
+ return Py_None;
+ }
+@@ -263,8 +263,7 @@
+ p_long(ibytes); p_long(obytes);
+ p_long(imcasts); p_long(omcasts);
+ p_long(iqdrops); p_long(noproto);
+- p_long(hwassist); p_long(unused);
+-#undef p, p_long, p_str, p_int
++#undef p
+
+ PyDict_SetItemString(r, ifmd.ifmd_name, d);
+ Py_DECREF(d);