[Ns-developers] ns2 patch for MacOS X 10.4 Tiger
Lars Eggert
lars.eggert at netlab.nec.de
Thu Jul 21 03:30:59 PDT 2005
On Jul 21, 2005, at 12:16, Lars Eggert wrote:
> the attached small patch fixes ns2-2.28 compilation with Apple's
> gcc-4.0 on MacOS X 10.4. Test suite also appears to validate
> correctly (still running.)
OK, so mailman strips off diff attachments. Here it is inline. This
lets me build ns-allinone-2.28 successfully:
diff -Bur ns-allinone-2.28/ns-2.28/emulate/net-pcap.cc /Users/eggert/
ns-allinone-2.28/ns-2.28/emulate/net-pcap.cc
--- ns-allinone-2.28/ns-2.28/emulate/net-pcap.cc 2005-01-25
23:38:47.000000000 +0100
+++ /Users/eggert/ns-allinone-2.28/ns-2.28/emulate/net-pcap.cc
2005-07-21 12:02:22.000000000 +0200
@@ -531,7 +530,7 @@
"warning: pcap/live (%s) couldn't get local IP network
info: %s\n",
name(), errbuf_) ;
}
-#ifndef __linux__
+#if !defined(__linux__) && !defined(__APPLE__)
{
int immed = 1;
if (ioctl(pfd_, BIOCIMMEDIATE, &immed) < 0) {
diff -Bur ns-allinone-2.28/ns-2.28/xcp/xcpq.cc /Users/eggert/ns-
allinone-2.28/ns-2.28/xcp/xcpq.cc
--- ns-allinone-2.28/ns-2.28/xcp/xcpq.cc 2005-02-03
19:29:20.000000000 +0100
+++ /Users/eggert/ns-allinone-2.28/ns-2.28/xcp/xcpq.cc 2005-07-21
11:44:25.000000000 +0200
@@ -24,6 +24,14 @@
#include "xcp.h"
#include "random.h"
+const double XCPQueue::ALPHA_;
+const double XCPQueue::BETA_;
+const double XCPQueue::GAMMA_;
+const double XCPQueue::XCP_MAX_INTERVAL;
+const double XCPQueue::XCP_MIN_INTERVAL;
+const double XCPQueue::BWIDTH;
+
+
static class XCPQClass : public TclClass {
public:
XCPQClass() : TclClass("Queue/DropTail/XCPQ") {}
Lars
--
Lars Eggert NEC Network Laboratories
More information about the Ns-developers
mailing list