View | Details | Raw Unified | Return to bug 260181 | Differences between
and this patch

Collapse All | Expand All

(-)b/devel/libfixposix/Makefile (-1 / +2 lines)
Lines 1-9 Link Here
1
PORTNAME=	libfixposix
1
PORTNAME=	libfixposix
2
DISTVERSIONPREFIX=	v
2
DISTVERSIONPREFIX=	v
3
DISTVERSION=	0.4.3
3
DISTVERSION=	0.4.3
4
PORTREVISION=	1
4
CATEGORIES=	devel
5
CATEGORIES=	devel
5
6
6
MAINTAINER=	ports@FreeBSD.org
7
MAINTAINER=	ports@shiori.com.br
7
COMMENT=	Replacement for inconsistent parts of POSIX
8
COMMENT=	Replacement for inconsistent parts of POSIX
8
9
9
LICENSE=	BSL
10
LICENSE=	BSL
(-)b/devel/libfixposix/distinfo (-1 / +1 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1546150128
1
TIMESTAMP = 1638482744
2
SHA256 (sionescu-libfixposix-v0.4.3_GH0.tar.gz) = 78fe8bcebf496520ac29b5b65049f5ec1977c6bd956640bdc6d1da6ea04d8504
2
SHA256 (sionescu-libfixposix-v0.4.3_GH0.tar.gz) = 78fe8bcebf496520ac29b5b65049f5ec1977c6bd956640bdc6d1da6ea04d8504
3
SIZE (sionescu-libfixposix-v0.4.3_GH0.tar.gz) = 40370
3
SIZE (sionescu-libfixposix-v0.4.3_GH0.tar.gz) = 40370
(-)b/devel/libfixposix/files/patch-src_lib_sendfile.c (+38 lines)
Added Link Here
1
--- src/lib/sendfile.c.orig	2018-02-19 22:24:10 UTC
2
+++ src/lib/sendfile.c
3
@@ -38,6 +38,7 @@ int sendfile(int, int, off_t, off_t *, void *, int);
4
 #endif
5
 
6
 #include <stdlib.h>
7
+#include <errno.h>
8
 
9
 DSO_PUBLIC ssize_t
10
 lfp_sendfile(int out_fd, int in_fd, off_t offset, size_t nbytes)
11
@@ -46,18 +47,21 @@ lfp_sendfile(int out_fd, int in_fd, off_t offset, size
12
 # if defined(__linux__)
13
     off_t off = offset;
14
     return (ssize_t) sendfile(out_fd, in_fd, &off, nbytes);
15
-# elif defined(__FreeBSD__)
16
-    return (ssize_t) sendfile(in_fd, out_fd, offset, nbytes, NULL, NULL, SF_MNOWAIT);
17
-# elif defined(__DragonFly__)
18
-    return (ssize_t) sendfile(in_fd, out_fd, offset, nbytes, NULL, NULL, 0);
19
+# elif defined(__FreeBSD__) || defined(__DragonFly__)
20
+    off_t sbytes;
21
+    int res = sendfile(in_fd, out_fd, offset, nbytes, NULL, &sbytes, 0);
22
+    if (res == 0) { return sbytes; }
23
+    return res;
24
 # elif defined(__APPLE__)
25
     off_t len = nbytes;
26
-    return (ssize_t) sendfile(in_fd, out_fd, offset, &len, NULL, 0);
27
+    int res = sendfile(in_fd, out_fd, offset, &len, NULL, 0);
28
+    if (res == 0) { return len; }
29
+    return -1;
30
 # else
31
 #  error "It appears that this OS has sendfile(), but LFP doesn't use it at the moment"
32
 #  error "Please send an email to iolib-devel@common-lisp.net"
33
 # endif
34
 #else
35
-    return ENOSYS;
36
+    SYSERR(ENOSYS);
37
 #endif
38
 }

Return to bug 260181