Commit 560a5471 authored by Davide Pala's avatar Davide Pala
Browse files

Merge branch 'master' of gitlab.inria.fr:srokicki/Comet

parents 40fd3239 9e0d2839
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
#include <fcntl.h> #include <fcntl.h>
#include <stdlib.h> #include <stdlib.h>
#include <string> #include <string>
#include <sys/sendfile.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/types.h> #include <sys/types.h>
#include <unistd.h> #include <unistd.h>
...@@ -230,10 +229,11 @@ ElfFile* ElfFile::copy(char* newDest) ...@@ -230,10 +229,11 @@ ElfFile* ElfFile::copy(char* newDest)
// sendfile will work with non-socket output (i.e. regular file) on // sendfile will work with non-socket output (i.e. regular file) on
// Linux 2.6.33+ // Linux 2.6.33+
off_t bytesCopied = 0; // This is dead code, will NOT compile on OSX
struct stat fileinfo = {0}; // off_t bytesCopied = 0;
fstat(input, &fileinfo); // struct stat fileinfo = {0};
sendfile(output, input, &bytesCopied, fileinfo.st_size); // fstat(input, &fileinfo);
// sendfile(output, input, &bytesCopied, fileinfo.st_size);
close(input); close(input);
close(output); close(output);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment