ports/124985: [patch] devel/dmucs unbreak on 64bits archs
Pietro Cerutti
gahr at FreeBSD.org
Wed Jun 25 18:30:10 UTC 2008
>Number: 124985
>Category: ports
>Synopsis: [patch] devel/dmucs unbreak on 64bits archs
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Jun 25 18:30:09 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Pietro Cerutti
>Release: FreeBSD 8.0-CURRENT i386
>Organization:
The FreeBSD Project
>Environment:
System: FreeBSD 8.0-CURRENT #2: Tue Jun 24 08:15:41 CEST 2008
root at gahrtop.localhost:/usr/obj/usr/src/sys/MSI1034
>Description:
>How-To-Repeat:
>Fix:
--- dmucs.diff begins here ---
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/devel/dmucs/Makefile,v
retrieving revision 1.2
diff -u -u -r1.2 Makefile
--- Makefile 20 Apr 2008 22:26:59 -0000 1.2
+++ Makefile 25 Jun 2008 18:05:54 -0000
@@ -19,10 +19,4 @@
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
PLIST_FILES= bin/dmucs bin/gethost bin/loadavg bin/monitor bin/remhost
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} >= 700042 && ${ARCH} == "amd64"
-BROKEN= does not compile
-.endif
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
Index: files/patch-dmucs_db.cc
===================================================================
RCS file: files/patch-dmucs_db.cc
diff -N files/patch-dmucs_db.cc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-dmucs_db.cc 25 Jun 2008 18:05:13 -0000
@@ -0,0 +1,20 @@
+--- dmucs_db.cc.orig 2008-06-25 17:58:38.000000000 +0000
++++ dmucs_db.cc 2008-06-25 17:59:29.000000000 +0000
+@@ -61,7 +61,7 @@
+
+
+ void
+-DmucsDb::assignCpuToClient(const unsigned int clientIp,
++DmucsDb::assignCpuToClient(const size_t clientIp,
+ const DmucsDprop dprop,
+ const unsigned int sock)
+ {
+@@ -145,7 +145,7 @@
+
+
+ void
+-DmucsDpropDb::assignCpuToClient(const unsigned int hostIp,
++DmucsDpropDb::assignCpuToClient(const size_t hostIp,
+ const unsigned int sock)
+ {
+ struct in_addr t2;
Index: files/patch-dmucs_db.h
===================================================================
RCS file: files/patch-dmucs_db.h
diff -N files/patch-dmucs_db.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-dmucs_db.h 25 Jun 2008 18:05:18 -0000
@@ -0,0 +1,20 @@
+--- dmucs_db.h.orig 2008-06-25 17:55:51.000000000 +0000
++++ dmucs_db.h 2008-06-25 17:56:11.000000000 +0000
+@@ -97,7 +97,7 @@
+ DmucsHost * getHost(const struct in_addr &ipAddr);
+ bool haveHost(const struct in_addr &ipAddr);
+ unsigned int getBestAvailCpu();
+- void assignCpuToClient(const unsigned int clientIp,
++ void assignCpuToClient(const size_t clientIp,
+ const unsigned int cpuIp);
+ void moveCpus(DmucsHost *host, int oldTier, int newTier);
+ int delCpusFromTier(int tier, unsigned int ipAddr);
+@@ -195,7 +195,7 @@
+ }
+ return itr->second.getBestAvailCpu();
+ }
+- void assignCpuToClient(const unsigned int clientIp,
++ void assignCpuToClient(const size_t clientIp,
+ const DmucsDprop dprop,
+ const unsigned int sock);
+ void moveCpus(DmucsHost *host, int oldTier, int newTier) {
Index: files/patch-dmucs_msg.cc
===================================================================
RCS file: files/patch-dmucs_msg.cc
diff -N files/patch-dmucs_msg.cc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-dmucs_msg.cc 25 Jun 2008 18:05:24 -0000
@@ -0,0 +1,11 @@
+--- dmucs_msg.cc.orig 2008-06-25 18:00:55.000000000 +0000
++++ dmucs_msg.cc 2008-06-25 18:02:13.000000000 +0000
+@@ -130,7 +130,7 @@
+
+ fprintf(stderr, "Giving out %s\n", resolved_name.c_str());
+
+- db->assignCpuToClient(cpuIpAddr, dprop_, (unsigned int) sock);
++ db->assignCpuToClient(cpuIpAddr, dprop_, (size_t) sock);
+ #if 0
+ fprintf(stderr, "The databases are now:\n");
+ db->dump();
Index: files/patch-main.cc
===================================================================
RCS file: files/patch-main.cc
diff -N files/patch-main.cc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-main.cc 25 Jun 2008 18:05:30 -0000
@@ -0,0 +1,11 @@
+--- main.cc.orig 2008-06-25 18:02:16.000000000 +0000
++++ main.cc 2008-06-25 18:02:38.000000000 +0000
+@@ -286,7 +286,7 @@
+
+ if (Sgets(buf, BUFSIZE, sock_req) == NULL) {
+ DMUCS_DEBUG((stderr, "Socket closed: %s\n", peer2buf(sock_req, buf)));
+- db->releaseCpu((unsigned int)sock_req);
++ db->releaseCpu((size_t )sock_req);
+ removeFd(sock_req);
+ return;
+ }
--- dmucs.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list