pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Update patches.



Module Name:	pkgsrc-wip
Committed By:	Sergey A. Osokin <osa%FreeBSD.org@localhost>
Pushed By:	osa
Date:		Thu Aug 13 22:12:16 2020 -0400
Changeset:	0ab581a2d3289da61cb437d256f9a5a94a9bc00c

Modified Files:
	unit/distinfo
	unit/patches/patch-auto_sendfile
	unit/patches/patch-src_nxt__application.c
	unit/patches/patch-src_nxt__conn__write.c

Log Message:
Update patches.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=0ab581a2d3289da61cb437d256f9a5a94a9bc00c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 unit/distinfo                             |  6 +++---
 unit/patches/patch-auto_sendfile          |  9 +++------
 unit/patches/patch-src_nxt__application.c |  3 ---
 unit/patches/patch-src_nxt__conn__write.c | 29 +++++++++++++----------------
 4 files changed, 19 insertions(+), 28 deletions(-)

diffs:
diff --git a/unit/distinfo b/unit/distinfo
index 5b0504ee30..c606b433f7 100644
--- a/unit/distinfo
+++ b/unit/distinfo
@@ -4,6 +4,6 @@ SHA1 (unit-1.18.0.tar.gz) = ef7edf05201ea9b52b2c92e5c9dce3b9fa00cd98
 RMD160 (unit-1.18.0.tar.gz) = fa25a9e7556fcc34b9d243669a15ae2848d2054e
 SHA512 (unit-1.18.0.tar.gz) = 2beac69caeb09278a6c2cdafe20a8040e589f9ad6e302c896cd396ae7d576f563dd6a480f815b4a26d22e15592b5abcd927a8ba436517bd9b9bbb78bff3176ff
 Size (unit-1.18.0.tar.gz) = 742273 bytes
-SHA1 (patch-auto_sendfile) = 48817385ee41e7d6bd990889236c4c29e9929d2a
-SHA1 (patch-src_nxt__application.c) = 9dc38526ffe483b50712c27d9c63b8d481eddf5a
-SHA1 (patch-src_nxt__conn__write.c) = ef3193bbb3afc12a247e64ffa79db940e04a94d3
+SHA1 (patch-auto_sendfile) = 9a5d0caaf9ffb787d5961eaa891bbe680300a8d6
+SHA1 (patch-src_nxt__application.c) = c488775742bcd55f6d0cbc2d2f0263bc7c7519b7
+SHA1 (patch-src_nxt__conn__write.c) = c5a70c2e18ed399bece5efcebe38f0369c7c911d
diff --git a/unit/patches/patch-auto_sendfile b/unit/patches/patch-auto_sendfile
index 9267f73642..0de9598863 100644
--- a/unit/patches/patch-auto_sendfile
+++ b/unit/patches/patch-auto_sendfile
@@ -1,13 +1,10 @@
-$NetBSD$
-
-
 --- auto/sendfile.orig	2020-08-08 16:00:55.378410575 -0400
 +++ auto/sendfile	2020-08-08 16:16:14.270362755 -0400
 @@ -5,6 +5,7 @@
  
  NXT_HAVE_LINUX_SENDFILE=NO
  NXT_HAVE_FREEBSD_SENDFILE=NO
-+NXT_HAVE_NETBSD_SENDFILE=NO
++NXT_HAVE_NETBSD_MMAP_WRITE=NO
  NXT_HAVE_MACOSX_SENDFILE=NO
  NXT_HAVE_SOLARIS_SENDFILEV=NO
  NXT_HAVE_AIX_SEND_FILE=NO
@@ -20,7 +17,7 @@ $NetBSD$
 +    # NetBSD has no sendfile().
 +
 +    nxt_feature="NetBSD mmap()/write()"
-+    nxt_feature_name=NXT_HAVE_NETBSD_SENDFILE
++    nxt_feature_name=NXT_HAVE_NETBSD_MMAP_WRITE
 +    nxt_feature_libs=
 +    nxt_feature_test="#include <sys/types.h>
 +                      #include <sys/mman.h>
@@ -40,7 +37,7 @@ $NetBSD$
 +    . auto/feature
 +
 +    if [ $nxt_found = yes ]; then
-+        NXT_HAVE_NETBSD_SENDFILE=YES
++        NXT_HAVE_NETBSD_MMAP_WRITE=YES
 +    fi
 +fi
  
diff --git a/unit/patches/patch-src_nxt__application.c b/unit/patches/patch-src_nxt__application.c
index 415ab87dfe..fffc59ebee 100644
--- a/unit/patches/patch-src_nxt__application.c
+++ b/unit/patches/patch-src_nxt__application.c
@@ -1,6 +1,3 @@
-$NetBSD$
-
-
 --- src/nxt_application.c.orig	2020-08-08 16:28:19.771768606 -0400
 +++ src/nxt_application.c	2020-08-08 16:33:14.070404193 -0400
 @@ -474,20 +474,24 @@
diff --git a/unit/patches/patch-src_nxt__conn__write.c b/unit/patches/patch-src_nxt__conn__write.c
index 1e7a807de8..be73dc9341 100644
--- a/unit/patches/patch-src_nxt__conn__write.c
+++ b/unit/patches/patch-src_nxt__conn__write.c
@@ -1,25 +1,22 @@
-$NetBSD$
-
-
 --- src/nxt_conn_write.c.orig	2020-05-28 12:04:00.000000000 -0400
-+++ src/nxt_conn_write.c	2020-08-08 16:49:50.752693316 -0400
++++ src/nxt_conn_write.c	2020-08-12 14:52:46.453112517 -0400
 @@ -266,6 +266,21 @@
      res = sendfile(s, fd, &pos, size);
  #endif
  
-+#ifdef NXT_HAVE_NETBSD_SENDFILE
-+    struct stat fileinfo;
-+    void *fmem = NULL;
-+    res = fstat(fd, &fileinfo);
-+    if (res == 0) {
-+        fmem = mmap(NULL, fileinfo.st_size, PROT_READ, MAP_FILE | MAP_SHARED, fd, 0);
-+    }
-+    if (fmem != NULL) {
-+        res = write(s, fmem, fileinfo.st_size);
-+        munmap(fmem, fileinfo.st_size);
-+    } else {
-+        res = -1;
++#ifdef NXT_HAVE_NETBSD_MMAP_WRITE
++    int   err;
++    void *map;
++
++    map = mmap(NULL, size, PROT_READ, MAP_FILE | MAP_SHARED, fd, pos);
++    if (nxt_slow_path(map == MAP_FAILED)) {
++        return -1;
 +    }
++
++    res = write(s, map, size);
++    err = errno;
++    (void) munmap(map, size);
++    errno = err;
 +#endif 
 +
      return res;


Home | Main Index | Thread Index | Old Index