Attention une mise à jour du serveur va être effectuée le lundi 17 mai entre 13h et 13h30. Cette mise à jour va générer une interruption du service de quelques minutes.

Commit 9e0d2839 authored by bugbrother's avatar bugbrother

Removed unused code that doesn't compile on OSX

parent 4f282c94
......@@ -2,7 +2,6 @@
#include <fcntl.h>
#include <stdlib.h>
#include <string>
#include <sys/sendfile.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
......@@ -230,10 +229,11 @@ ElfFile* ElfFile::copy(char* newDest)
// sendfile will work with non-socket output (i.e. regular file) on
// Linux 2.6.33+
off_t bytesCopied = 0;
struct stat fileinfo = {0};
fstat(input, &fileinfo);
sendfile(output, input, &bytesCopied, fileinfo.st_size);
// This is dead code, will NOT compile on OSX
// off_t bytesCopied = 0;
// struct stat fileinfo = {0};
// fstat(input, &fileinfo);
// sendfile(output, input, &bytesCopied, fileinfo.st_size);
close(input);
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