diff -ru ns-2.35.orig/linkstate/ls.h ns-2.35/linkstate/ls.h
--- ns-2.35.orig/linkstate/ls.h	2010-03-08 06:54:51.000000000 +0100
+++ ns-2.35/linkstate/ls.h	2013-03-28 20:50:25.325632309 +0100
@@ -68,6 +68,7 @@
 #include <list>
 #include <map>
 #include <utility>
+#include <unistd.h>
 
 #include "timer-handler.h"
 
@@ -134,7 +135,7 @@
 		return ib.second ? ib.first : baseMap::end();
 	}
 
-	void eraseAll() { erase(baseMap::begin(), baseMap::end()); }
+	void eraseAll() { this->erase(baseMap::begin(), baseMap::end()); }
 	T* findPtr(Key key) {
 		iterator it = baseMap::find(key);
 		return (it == baseMap::end()) ? (T *)NULL : &((*it).second);
