Path: blob/main/deskutils/cairo-dock/files/patch-src_gldit_cairo-dock-file-manager.c
16461 views
--- src/gldit/cairo-dock-file-manager.c.orig 2014-10-15 14:16:34 UTC1+++ src/gldit/cairo-dock-file-manager.c2@@ -21,7 +21,11 @@3#include <string.h> // memset4#include <sys/stat.h> // stat5#include <fcntl.h> // open6+#if defined (__FreeBSD__) || defined (__DragonFly__)7+#include <sys/socket.h>8+#else9#include <sys/sendfile.h> // sendfile10+#endif11#include <errno.h> // errno1213#include "gldi-config.h"14@@ -500,7 +504,7 @@ gboolean cairo_dock_copy_file (const gch15{16// perform in-kernel transfer (zero copy to user space)17int size;18- #ifdef __FreeBSD__19+ #if defined (__FreeBSD__) || defined (__DragonFly__)20size = sendfile (src_fd, dest_fd, 0, stat.st_size, NULL, NULL, 0);21#else // Linux >= 2.6.33 for being able to have a regular file as the output socket22size = sendfile (dest_fd, src_fd, NULL, stat.st_size); // note the inversion between both calls ^_^;232425