Fix Illumos build.

This commit is contained in:
schmonz 2020-06-26 19:21:52 +00:00
parent c8c4529c1b
commit f92f7cb1b2
4 changed files with 58 additions and 1 deletions

View file

@ -1,12 +1,15 @@
$NetBSD: distinfo,v 1.8 2019/12/22 22:23:00 joerg Exp $
$NetBSD: distinfo,v 1.9 2020/06/26 19:21:52 schmonz Exp $
SHA1 (libowfat-0.32.tar.xz) = 7b66caa576e9ce2d789e230a5a42c63e4f103471
RMD160 (libowfat-0.32.tar.xz) = 2338a3f31d55c3f6a97c3073664e6aeec198f28c
SHA512 (libowfat-0.32.tar.xz) = c762a1aa27dfb30e2f6da67d1ad16da03d301b2e3cce33c83b69103183a6689a494c8cf8d7d4e26ad5b22130e4e0560d5f3ef6f44b14d706f10e2300ce11ff3b
Size (libowfat-0.32.tar.xz) = 195820 bytes
SHA1 (patch-aa) = 5f7cbfd30e151957b18439bb3bacabe17c292d47
SHA1 (patch-io_io__sendfile.c) = 22ece69cb1c55d4710d7c6e562d32fcbeca7a18c
SHA1 (patch-io_iom__init.c) = 0fbb7984e526ee78259339cac8d1cb43d2ac3cd7
SHA1 (patch-io_iom__wait.c) = c9d00bc6a42f901c9552f779de7fadeb75e713bc
SHA1 (patch-mmap_mmap__readat.c) = 1c7ef7996491496fe943aa5f47213e3fcd46269e
SHA1 (patch-scan_scan__iso8601.c) = 761d9941e8310d2c56020cee51261d0378530b56
SHA1 (patch-tai_tai__now__libowfat.3) = cd51600b7c0da29ccca3c649039f8fe07f7276c9
SHA1 (patch-tai_tai__pack__libowfat.3) = 8dd463a76d289773827793538373a7a029617a0a
SHA1 (patch-taia_taia__now__libowfat.3) = 0d9aa54facfc7b26d952a952a431c65b62db95ed

View file

@ -0,0 +1,25 @@
$NetBSD: patch-io_io__sendfile.c,v 1.1 2020/06/26 19:21:52 schmonz Exp $
Fix Illumos build.
--- io/io_sendfile.c.orig 2014-06-05 19:17:24.000000000 +0000
+++ io/io_sendfile.c
@@ -49,7 +49,9 @@ int64 io_sendfile(int64 out,int64 in,uin
#elif defined (__sun__) && defined(__svr4__)
+#ifndef _LARGEFILE64_SOURCE
#define _LARGEFILE64_SOURCE
+#endif
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/sendfile.h>
@@ -59,7 +61,7 @@ int64 io_sendfile(int64 out,int64 in,uin
long long r=sendfile64(out,in,&o,bytes);
if (r==-1 && errno!=EAGAIN) r=-3;
if (r!=bytes) {
- io_entry* e=iarray_get(&io_fds,s);
+ io_entry* e=iarray_get(&io_fds,out);
if (e) {
e->canwrite=0;
e->next_write=-1;

View file

@ -0,0 +1,14 @@
$NetBSD: patch-mmap_mmap__readat.c,v 1.1 2020/06/26 19:21:52 schmonz Exp $
Fix Illumos build.
--- mmap/mmap_readat.c.orig 2016-09-16 16:22:00.000000000 +0000
+++ mmap/mmap_readat.c
@@ -4,6 +4,7 @@
#include <sys/types.h>
#include <unistd.h>
#ifndef __MINGW32__
+#include <sys/time.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>

View file

@ -0,0 +1,15 @@
$NetBSD: patch-scan_scan__iso8601.c,v 1.1 2020/06/26 19:21:52 schmonz Exp $
Fix Illumos build.
--- scan/scan_iso8601.c.orig 2016-04-27 14:07:50.000000000 +0000
+++ scan/scan_iso8601.c
@@ -44,7 +44,7 @@ size_t scan_iso8601(const char* in,struc
}
}
-#ifdef __MINGW32__
+#if defined(__MINGW32__) || (defined (__sun__) && defined(__svr4__))
x.tm_wday=x.tm_yday=x.tm_isdst=0;
#else
x.tm_wday=x.tm_yday=x.tm_isdst=x.tm_gmtoff=0;