33 lines
1.2 KiB
C
33 lines
1.2 KiB
C
$NetBSD: patch-src_unix_fs.c,v 1.1 2017/03/22 01:45:08 taca Exp $
|
|
|
|
* Fix portability on NetBSD.
|
|
|
|
--- src/unix/fs.c.orig 2017-02-01 00:38:56.000000000 +0000
|
|
+++ src/unix/fs.c
|
|
@@ -778,7 +778,7 @@ static void uv__to_stat(struct stat* src
|
|
dst->st_blksize = src->st_blksize;
|
|
dst->st_blocks = src->st_blocks;
|
|
|
|
-#if defined(__APPLE__)
|
|
+#if defined(__APPLE__) || defined(__NetBSD__)
|
|
dst->st_atim.tv_sec = src->st_atimespec.tv_sec;
|
|
dst->st_atim.tv_nsec = src->st_atimespec.tv_nsec;
|
|
dst->st_mtim.tv_sec = src->st_mtimespec.tv_sec;
|
|
@@ -804,7 +804,6 @@ static void uv__to_stat(struct stat* src
|
|
defined(__DragonFly__) || \
|
|
defined(__FreeBSD__) || \
|
|
defined(__OpenBSD__) || \
|
|
- defined(__NetBSD__) || \
|
|
defined(_GNU_SOURCE) || \
|
|
defined(_BSD_SOURCE) || \
|
|
defined(_SVID_SOURCE) || \
|
|
@@ -816,8 +815,7 @@ static void uv__to_stat(struct stat* src
|
|
dst->st_mtim.tv_nsec = src->st_mtim.tv_nsec;
|
|
dst->st_ctim.tv_sec = src->st_ctim.tv_sec;
|
|
dst->st_ctim.tv_nsec = src->st_ctim.tv_nsec;
|
|
-# if defined(__FreeBSD__) || \
|
|
- defined(__NetBSD__)
|
|
+# if defined(__FreeBSD__)
|
|
dst->st_birthtim.tv_sec = src->st_birthtim.tv_sec;
|
|
dst->st_birthtim.tv_nsec = src->st_birthtim.tv_nsec;
|
|
dst->st_flags = src->st_flags;
|