Re-do cumulus side of upload script interface.
[cumulus.git] / store.cc
index 720d3bb..bfeb18a 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>
@@ -42,6 +43,7 @@
 
 #include "store.h"
 #include "ref.h"
+#include "util.h"
 
 using std::max;
 using std::list;
@@ -54,16 +56,6 @@ using std::string;
 const char *filter_program = "bzip2 -c";
 const char *filter_extension = ".bz2";
 
-static void cloexec(int fd)
-{
-    long flags = fcntl(fd, F_GETFD);
-
-    if (flags < 0)
-        return;
-
-    fcntl(fd, F_SETFD, flags | FD_CLOEXEC);
-}
-
 Tarfile::Tarfile(RemoteFile *file, const string &segment)
     : size(0),
       segment_name(segment)