aboutsummaryrefslogtreecommitdiff
path: root/devel/dmucs
diff options
context:
space:
mode:
authorMax Khon <fjoe@FreeBSD.org>2008-07-07 16:17:54 +0000
committerMax Khon <fjoe@FreeBSD.org>2008-07-07 16:17:54 +0000
commit3889d9f5d61ce705215e6449d4f7dc0dc95f455d (patch)
treef0ffe07a92aaff4ed3cbf64f2818ca8b46eb7593 /devel/dmucs
parent5ec56b0873a4d6026e5cc17c50e399f25fa13d93 (diff)
downloadports-3889d9f5d61ce705215e6449d4f7dc0dc95f455d.tar.gz
ports-3889d9f5d61ce705215e6449d4f7dc0dc95f455d.zip
Notes
Diffstat (limited to 'devel/dmucs')
-rw-r--r--devel/dmucs/Makefile9
-rw-r--r--devel/dmucs/files/patch-dmucs_db.cc46
-rw-r--r--devel/dmucs/files/patch-dmucs_db.h53
-rw-r--r--devel/dmucs/files/patch-dmucs_msg.cc11
-rw-r--r--devel/dmucs/files/patch-main.cc11
5 files changed, 123 insertions, 7 deletions
diff --git a/devel/dmucs/Makefile b/devel/dmucs/Makefile
index 971fdb7049e4..8f222a3183bb 100644
--- a/devel/dmucs/Makefile
+++ b/devel/dmucs/Makefile
@@ -7,6 +7,7 @@
PORTNAME= dmucs
PORTVERSION= 0.6.1
+PORTREVISION= 1
CATEGORIES= devel
MASTER_SITES= SF
@@ -19,10 +20,4 @@ GNU_CONFIGURE= yes
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>
diff --git a/devel/dmucs/files/patch-dmucs_db.cc b/devel/dmucs/files/patch-dmucs_db.cc
new file mode 100644
index 000000000000..dbd30894e1a8
--- /dev/null
+++ b/devel/dmucs/files/patch-dmucs_db.cc
@@ -0,0 +1,46 @@
+--- dmucs_db.cc.orig 2008-07-07 23:02:33.000000000 +0700
++++ dmucs_db.cc 2008-07-07 23:12:12.000000000 +0700
+@@ -63,7 +63,7 @@
+ void
+ DmucsDb::assignCpuToClient(const unsigned int clientIp,
+ const DmucsDprop dprop,
+- const unsigned int sock)
++ const unsigned long sock)
+ {
+ MutexMonitor m(&mutex_);
+
+@@ -74,7 +74,7 @@
+
+
+ void
+-DmucsDb::releaseCpu(const unsigned int sock)
++DmucsDb::releaseCpu(const unsigned long sock)
+ {
+ /* Get the dprop so that we can release the cpu back into the
+ correct sub-db in the DmucsDb. */
+@@ -146,7 +146,7 @@
+
+ void
+ DmucsDpropDb::assignCpuToClient(const unsigned int hostIp,
+- const unsigned int sock)
++ const unsigned long sock)
+ {
+ struct in_addr t2;
+ t2.s_addr = hostIp;
+@@ -164,13 +164,13 @@
+
+
+ void
+-DmucsDpropDb::releaseCpu(const unsigned int sock)
++DmucsDpropDb::releaseCpu(const unsigned long sock)
+ {
+- DMUCS_DEBUG((stderr, "releaseCpu for socket 0x%x\n", sock));
++ DMUCS_DEBUG((stderr, "releaseCpu for socket 0x%lx\n", sock));
+
+ dmucs_assigned_cpus_iter_t itr = assignedCpus_.find(sock);
+ if (itr == assignedCpus_.end()) {
+- DMUCS_DEBUG((stderr, "No cpu found in assignedCpus for sock 0x%x\n",
++ DMUCS_DEBUG((stderr, "No cpu found in assignedCpus for sock 0x%lx\n",
+ sock));
+ return;
+ }
diff --git a/devel/dmucs/files/patch-dmucs_db.h b/devel/dmucs/files/patch-dmucs_db.h
new file mode 100644
index 000000000000..3fc0f4ef5e29
--- /dev/null
+++ b/devel/dmucs/files/patch-dmucs_db.h
@@ -0,0 +1,53 @@
+--- dmucs_db.h.orig 2008-07-07 23:02:38.000000000 +0700
++++ dmucs_db.h 2008-07-07 23:10:18.000000000 +0700
+@@ -56,7 +56,7 @@
+ /* This is a mapping from sock address to host ip address -- the socket
+ of the connection from the "gethost" application to the dmucs server,
+ and the hostip of the cpu assigned to the "gethost" application. */
+- typedef std::map<const unsigned int, const unsigned int>
++ typedef std::map<const unsigned long, const unsigned int>
+ dmucs_assigned_cpus_t;
+ typedef dmucs_assigned_cpus_t::iterator dmucs_assigned_cpus_iter_t;
+
+@@ -98,12 +98,12 @@
+ bool haveHost(const struct in_addr &ipAddr);
+ unsigned int getBestAvailCpu();
+ void assignCpuToClient(const unsigned int clientIp,
+- const unsigned int cpuIp);
++ const unsigned long cpuIp);
+ void moveCpus(DmucsHost *host, int oldTier, int newTier);
+ int delCpusFromTier(int tier, unsigned int ipAddr);
+
+ void addNewHost(DmucsHost *host);
+- void releaseCpu(const unsigned int sock);
++ void releaseCpu(const unsigned long sock);
+
+ void addToHostSet(dmucs_host_set_t *theSet, DmucsHost *host);
+ void delFromHostSet(dmucs_host_set_t *theSet, DmucsHost *host);
+@@ -154,7 +154,7 @@
+ /* A mapping of socket to distinguishing property -- so that when a
+ host is released and all we have is the socket information, we can
+ figure out which DpropDb to put the host back into. */
+- typedef std::map<int, DmucsDprop> dmucs_sock_dprop_db_t;
++ typedef std::map<long, DmucsDprop> dmucs_sock_dprop_db_t;
+ typedef dmucs_sock_dprop_db_t::iterator dmucs_sock_dprop_db_iter_t;
+
+ dmucs_sock_dprop_db_t sock2DpropDb_;
+@@ -197,7 +197,7 @@
+ }
+ void assignCpuToClient(const unsigned int clientIp,
+ const DmucsDprop dprop,
+- const unsigned int sock);
++ const unsigned long sock);
+ void moveCpus(DmucsHost *host, int oldTier, int newTier) {
+ MutexMonitor m(&mutex_);
+ // Assume the DmucsDpropDb is definitely there.
+@@ -261,7 +261,7 @@
+ return dbDb_.find(host->getDprop())->second.delFromUnavailDb(host);
+ }
+
+- void releaseCpu(const unsigned int sock);
++ void releaseCpu(const unsigned long sock);
+
+ void handleSilentHosts() {
+ MutexMonitor m(&mutex_);
diff --git a/devel/dmucs/files/patch-dmucs_msg.cc b/devel/dmucs/files/patch-dmucs_msg.cc
new file mode 100644
index 000000000000..9247ed22ed54
--- /dev/null
+++ b/devel/dmucs/files/patch-dmucs_msg.cc
@@ -0,0 +1,11 @@
+--- dmucs_msg.cc.orig 2008-07-07 23:02:45.000000000 +0700
++++ dmucs_msg.cc 2008-07-07 23:10:25.000000000 +0700
+@@ -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_, (unsigned long) sock);
+ #if 0
+ fprintf(stderr, "The databases are now:\n");
+ db->dump();
diff --git a/devel/dmucs/files/patch-main.cc b/devel/dmucs/files/patch-main.cc
new file mode 100644
index 000000000000..83c9161a16f9
--- /dev/null
+++ b/devel/dmucs/files/patch-main.cc
@@ -0,0 +1,11 @@
+--- main.cc.orig 2008-07-07 23:03:07.000000000 +0700
++++ main.cc 2008-07-07 23:05:51.000000000 +0700
+@@ -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((unsigned long)sock_req);
+ removeFd(sock_req);
+ return;
+ }