Add some missing #include statements.
authorMichael Vrable <mvrable@cs.ucsd.edu>
Mon, 30 Jun 2008 20:28:12 +0000 (13:28 -0700)
committerMichael Vrable <mvrable@turin.ucsd.edu>
Mon, 30 Jun 2008 20:28:12 +0000 (13:28 -0700)
Some standard include files (stdlib.h and string.h) were not being included
where necessary.  This worked in the past, but seems to break for some
versions of the compiler/standard library, so be sure to include what we
need.

metadata.cc
ref.cc
scandir.cc
store.cc
subfile.cc
util.cc

index d946386..8de1a00 100644 (file)
@@ -24,6 +24,8 @@
  * handling of the statcache, and re-use of metadata between snapshots.
  */
 
+#include <stdlib.h>
+#include <string.h>
 #include <string>
 #include <iostream>
 #include <map>
diff --git a/ref.cc b/ref.cc
index 2f870a6..bed4daf 100644 (file)
--- a/ref.cc
+++ b/ref.cc
@@ -25,6 +25,8 @@
 
 #include <assert.h>
 #include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 #include <uuid/uuid.h>
 
 #include <string>
index 01c4a7d..e82a918 100644 (file)
@@ -30,6 +30,7 @@
 #include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <sys/stat.h>
 #include <sys/sysmacros.h>
 #include <sys/types.h>
index 720d3bb..9e7fc99 100644 (file)
--- a/store.cc
+++ b/store.cc
@@ -25,6 +25,7 @@
 #include <assert.h>
 #include <errno.h>
 #include <stdio.h>
+#include <string.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/resource.h>
index 4e13005..dac7eda 100644 (file)
@@ -23,6 +23,7 @@
  * referenced from the new metadata log. */
 
 #include <stdlib.h>
+#include <string.h>
 #include <assert.h>
 #include <arpa/inet.h>
 
diff --git a/util.cc b/util.cc
index 22aab3b..b595eea 100644 (file)
--- a/util.cc
+++ b/util.cc
@@ -22,6 +22,7 @@
  * later, for parsing them back, perhaps). */
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <uuid/uuid.h>
 
 #include <iostream>