about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
-rw-r--r--lib/Core/Executor.cpp8
-rw-r--r--lib/Solver/Solver.cpp1
-rw-r--r--runtime/klee-libc/htonl.c2
-rw-r--r--tools/klee/main.cpp1
4 files changed, 3 insertions, 9 deletions
diff --git a/lib/Core/Executor.cpp b/lib/Core/Executor.cpp
index 6abd0234..64f67b4c 100644
--- a/lib/Core/Executor.cpp
+++ b/lib/Core/Executor.cpp
@@ -258,9 +258,6 @@ namespace {
 }
 
 
-static void *theMMap = 0;
-static unsigned theMMapSize = 0;
-
 namespace klee {
   RNG theRNG;
 }
@@ -3269,11 +3266,6 @@ void Executor::runFunctionAsMain(Function *f,
 
   if (statsTracker)
     statsTracker->done();
-
-  if (theMMap) {
-    munmap(theMMap, theMMapSize);
-    theMMap = 0;
-  }
 }
 
 unsigned Executor::getPathStreamID(const ExecutionState &state) {
diff --git a/lib/Solver/Solver.cpp b/lib/Solver/Solver.cpp
index 4059a82b..9f0d89af 100644
--- a/lib/Solver/Solver.cpp
+++ b/lib/Solver/Solver.cpp
@@ -29,6 +29,7 @@
 #include <vector>
 
 #include <errno.h>
+#include <unistd.h>
 #include <signal.h>
 #include <sys/wait.h>
 #include <sys/ipc.h>
diff --git a/runtime/klee-libc/htonl.c b/runtime/klee-libc/htonl.c
index cec2d0f5..521ef5d6 100644
--- a/runtime/klee-libc/htonl.c
+++ b/runtime/klee-libc/htonl.c
@@ -41,7 +41,7 @@ uint32_t htonl(uint32_t v) {
 
 #endif
 
-uint16_t ntohs(uint32_t v) {
+uint16_t ntohs(uint16_t v) {
   return htons(v);
 }
 uint32_t ntohl(uint32_t v) {
diff --git a/tools/klee/main.cpp b/tools/klee/main.cpp
index a5b8d046..82ced957 100644
--- a/tools/klee/main.cpp
+++ b/tools/klee/main.cpp
@@ -51,6 +51,7 @@
 #include <fstream>
 #include <cerrno>
 #include <dirent.h>
+#include <unistd.h>
 #include <errno.h>
 #include <sys/stat.h>
 #include <sys/wait.h>