Path: blob/main/deskutils/cairo-dock/files/patch-src_gldit_cairo-dock-file-manager.c
28313 views
--- src/gldit/cairo-dock-file-manager.c.orig 2025-11-02 19:18:06 UTC1+++ src/gldit/cairo-dock-file-manager.c2@@ -22,7 +22,13 @@3#include <string.h> // memset4#include <sys/stat.h> // stat5#include <fcntl.h> // open6+#if defined (__FreeBSD__) || defined (__DragonFly__)7+#include <sys/types.h>8+#include <sys/socket.h>9+#include <sys/uio.h>10+#else11#include <sys/sendfile.h> // sendfile12+#endif13#include <errno.h> // errno1415#include "gldi-config.h"16@@ -492,7 +498,7 @@ gboolean cairo_dock_copy_file (const gchar *cFilePath,17{18// perform in-kernel transfer (zero copy to user space)19int size;20- #ifdef __FreeBSD__21+ #if defined (__FreeBSD__) || defined (__DragonFly__)22size = sendfile (src_fd, dest_fd, 0, stat.st_size, NULL, NULL, 0);23#else // Linux >= 2.6.33 for being able to have a regular file as the output socket24size = sendfile (dest_fd, src_fd, NULL, stat.st_size); // note the inversion between both calls ^_^;252627