Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Oct 2017 17:13:32 +0000 (UTC)
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r453198 - in head/devel: valgrind valgrind-devel valgrind-devel/files valgrind/files
Message-ID:  <201710301713.v9UHDWF4073547@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bdrewery
Date: Mon Oct 30 17:13:31 2017
New Revision: 453198
URL: https://svnweb.freebsd.org/changeset/ports/453198

Log:
  Add support for ino64.
  
  PR:		219715
  Submitted by:	novel

Added:
  head/devel/valgrind-devel/files/extra-patch-ino64   (contents, props changed)
  head/devel/valgrind/files/extra-patch-ino64   (contents, props changed)
Modified:
  head/devel/valgrind-devel/Makefile
  head/devel/valgrind/Makefile

Modified: head/devel/valgrind-devel/Makefile
==============================================================================
--- head/devel/valgrind-devel/Makefile	Mon Oct 30 17:04:08 2017	(r453197)
+++ head/devel/valgrind-devel/Makefile	Mon Oct 30 17:13:31 2017	(r453198)
@@ -4,7 +4,7 @@
 PORTNAME=	valgrind
 PORTVERSION=	3.10.1.20160113
 DISTVERSIONPREFIX=	freebsd-
-PORTREVISION=	4
+PORTREVISION=	5
 PORTEPOCH=	1
 CATEGORIES=	devel
 MASTER_SITES=	https://bitbucket.org/${BB_ACCOUNT}/${BB_PROJECT}/get/${BB_COMMIT}.tar.gz?dummy=/ \
@@ -62,6 +62,10 @@ WRKSRC=		${WRKDIR}/${BB_ACCOUNT}-${BB_PROJECT}-${BB_CO
 CONFIGURE_ENV+=	ac_cv_path_PERL=${PERL}
 
 .include <bsd.port.options.mk>
+
+.if ${OSVERSION} > 1200030
+EXTRA_PATCHES+=	${FILESDIR}/extra-patch-ino64:-p1
+.endif
 
 .if ${ARCH} == "amd64"
 PLIST_SUB+=	AMD64="" ARCH=amd64

Added: head/devel/valgrind-devel/files/extra-patch-ino64
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/valgrind-devel/files/extra-patch-ino64	Mon Oct 30 17:13:31 2017	(r453198)
@@ -0,0 +1,241 @@
+From 6aaeefab2490d56743ec49d0e20d3fd6ff45fb55 Mon Sep 17 00:00:00 2001
+From: Roman Bogorodskiy <bogorodskiy@gmail.com>
+Date: Sat, 9 Sep 2017 18:27:15 +0400
+Subject: [PATCH v2] ino64 support
+
+---
+ coregrind/m_syswrap/priv_syswrap-freebsd.h |  4 ++
+ coregrind/m_syswrap/syswrap-freebsd.c      | 65 ++++++++++++++++++++++++++++++
+ include/vki/vki-freebsd.h                  | 56 +++++++++++++++++++++++++
+ include/vki/vki-scnums-freebsd.h           |  4 ++
+ 4 files changed, 129 insertions(+)
+
+diff --git a/coregrind/m_syswrap/priv_syswrap-freebsd.h b/coregrind/m_syswrap/priv_syswrap-freebsd.h
+index 63d122f..715ad48 100644
+--- a/coregrind/m_syswrap/priv_syswrap-freebsd.h
++++ b/coregrind/m_syswrap/priv_syswrap-freebsd.h
+@@ -97,10 +97,12 @@ DECL_TEMPLATE(freebsd, sys_setegid);
+ DECL_TEMPLATE(freebsd, sys_seteuid);
+ DECL_TEMPLATE(freebsd, sys_stat);
+ DECL_TEMPLATE(freebsd, sys_fstat);
++DECL_TEMPLATE(freebsd, sys_fstat64);
+ DECL_TEMPLATE(freebsd, sys_lstat);
+ DECL_TEMPLATE(freebsd, sys_pathconf);
+ DECL_TEMPLATE(freebsd, sys_fpathconf);
+ DECL_TEMPLATE(freebsd, sys_getdirentries);
++DECL_TEMPLATE(freebsd, sys_getdirentries64);
+ DECL_TEMPLATE(freebsd, sys_mmap);
+ DECL_TEMPLATE(freebsd, sys___syscall);
+ DECL_TEMPLATE(freebsd, sys_lseek);
+@@ -208,6 +210,7 @@ DECL_TEMPLATE(freebsd, sys_kevent);
+ DECL_TEMPLATE(freebsd, sys_sendfile);
+ DECL_TEMPLATE(freebsd, sys_statfs6);
+ DECL_TEMPLATE(freebsd, sys_fstatfs6);
++DECL_TEMPLATE(freebsd, sys_fstatfs64);
+ DECL_TEMPLATE(freebsd, sys_fhstatfs6);
+ DECL_TEMPLATE(freebsd, sys_thr_exit);
+ DECL_TEMPLATE(freebsd, sys_thr_self);
+@@ -251,6 +254,7 @@ DECL_TEMPLATE(freebsd, sys_fchmodat);
+ DECL_TEMPLATE(freebsd, sys_fchownat);
+ DECL_TEMPLATE(freebsd, sys_fexecve);
+ DECL_TEMPLATE(freebsd, sys_fstatat);
++DECL_TEMPLATE(freebsd, sys_fstatat64);
+ DECL_TEMPLATE(freebsd, sys_futimesat);
+ DECL_TEMPLATE(freebsd, sys_linkat);
+ DECL_TEMPLATE(freebsd, sys_mkdirat);
+diff --git a/coregrind/m_syswrap/syswrap-freebsd.c b/coregrind/m_syswrap/syswrap-freebsd.c
+index bf6b1f1..978e98e 100644
+--- a/coregrind/m_syswrap/syswrap-freebsd.c
++++ b/coregrind/m_syswrap/syswrap-freebsd.c
+@@ -885,6 +885,18 @@ POST(sys_fstat)
+    POST_MEM_WRITE( ARG2, sizeof(struct vki_stat) );
+ }
+ 
++PRE(sys_fstat64)
++{
++   PRINT("sys_fstat64 ( %ld, %#lx )", ARG1, ARG2);
++   PRE_REG_READ2(long, "fstat", unsigned long, fd, struct stat *, buf);
++   PRE_MEM_WRITE( "fstat(buf)", ARG2, sizeof(struct vki_stat64) );
++}
++
++POST(sys_fstat64)
++{
++   POST_MEM_WRITE( ARG2, sizeof(struct vki_stat64) );
++}
++
+ PRE(sys_pathconf)
+ {
+    PRINT("sys_pathconf ( %#lx(%s), %ld )",ARG1,(char *)ARG1,ARG2);
+@@ -1029,6 +1041,26 @@ POST(sys_getdirentries)
+    }
+ }
+ 
++PRE(sys_getdirentries64)
++{
++   *flags |= SfMayBlock;
++   PRINT("sys_getdents ( %ld, %#lx, %ld )", ARG1,ARG2,ARG3);
++   PRE_REG_READ3(vki_ssize_t, "getdirentries",
++                 unsigned int, fd, struct dirent *, dirp,
++                 vki_size_t, count);
++   PRE_MEM_WRITE( "getdirentries(dirp)", ARG2, ARG3 );
++}
++
++POST(sys_getdirentries64)
++{
++   vg_assert(SUCCESS);
++   if (RES > 0) {
++      POST_MEM_WRITE( ARG2, RES );
++      if ( ARG4 != 0 )
++	 POST_MEM_WRITE( ARG4, sizeof (vki_off_t));
++   }
++}
++
+ PRE(sys_seteuid)
+ {
+    PRINT("sys_seteuid ( %ld )", ARG1);
+@@ -1251,6 +1283,19 @@ POST(sys_fstatfs6)
+    POST_MEM_WRITE( ARG2, sizeof(struct vki_statfs6) );
+ }
+ 
++PRE(sys_fstatfs64)
++{
++   PRINT("sys_fstatfs64 ( %ld, %#lx )", ARG1, ARG2);
++   PRE_REG_READ2(long, "fstatfs6",
++                 unsigned int, fd, struct statfs *, buf);
++   PRE_MEM_WRITE( "fstatfs6(buf)", ARG2, sizeof(struct vki_statfs64) );
++}
++
++POST(sys_fstatfs64)
++{
++   POST_MEM_WRITE( ARG2, sizeof(struct vki_statfs64) );
++}
++
+ PRE(sys_statfs6)
+ {
+    PRINT("sys_statfs6 ( %#lx(%s), %#lx )",ARG1,(char *)ARG1,ARG2);
+@@ -3132,6 +3177,20 @@ POST(sys_fstatat)
+    POST_MEM_WRITE( ARG3, sizeof(struct vki_stat) );
+ }
+ 
++PRE(sys_fstatat64)
++{
++   PRINT("sys_fstatat ( %ld, %#lx(%s), %#lx )", ARG1,ARG2,(char*)ARG2,ARG3);
++   PRE_REG_READ3(long, "fstatat",
++                 int, dfd, char *, file_name, struct stat *, buf);
++   PRE_MEM_RASCIIZ( "fstatat(file_name)", ARG2 );
++   PRE_MEM_WRITE( "fstatat(buf)", ARG3, sizeof(struct vki_stat) );
++}
++
++POST(sys_fstatat64)
++{
++   POST_MEM_WRITE( ARG3, sizeof(struct vki_stat) );
++}
++
+ PRE(sys_unlinkat)
+ {
+    *flags |= SfMayBlock;
+@@ -4427,6 +4486,12 @@ const SyscallTableEntry ML_(syscall_table)[] = {
+    BSDXY(__NR_accept4,           sys_accept4),            //541
+    BSDXY(__NR_pipe2,			sys_pipe2),			// 542
+ 
++   // ino64
++   BSDXY(__NR_fstat64,			sys_fstat64),			// 551
++   BSDXY(__NR_fstatat64,		sys_fstatat64),			// 552
++   BSDXY(__NR_getdirentries64,		sys_getdirentries64),		// 554
++   GENXY(__NR_fstatfs64,		sys_fstatfs),   		// 556
++
+    BSDX_(__NR_fake_sigreturn,		sys_fake_sigreturn),		// 1000, fake sigreturn
+ 
+ };
+diff --git a/include/vki/vki-freebsd.h b/include/vki/vki-freebsd.h
+index aee453e..f20833a 100644
+--- a/include/vki/vki-freebsd.h
++++ b/include/vki/vki-freebsd.h
+@@ -367,6 +367,38 @@ struct vki_stat {
+ 	unsigned int :(8 / 2) * (16 - (int)sizeof(struct vki_timespec));
+ };
+ 
++struct vki_stat64 {
++	vki_uint64_t	st_dev;
++	vki_uint64_t	st_ino;
++	vki_uint64_t	st_nlink;
++	vki_mode_t	st_mode;
++        vki_int16_t     st_padding0;
++	vki_uid_t	st_uid;
++	vki_gid_t	st_gid;
++        vki_int32_t     st_padding1;
++	vki_uint64_t	st_rdev;
++#if 0
++	struct vki_timespec	st_atimespec;
++	struct vki_timespec	st_mtimespec;
++	struct vki_timespec	st_ctimespec;
++#else
++	vki_time_t	st_atime;
++	long		st_atime_nsec;
++	vki_time_t	st_mtime;
++	long		st_mtime_nsec;
++	vki_time_t	st_ctime;
++	long		st_ctime_nsec;
++#endif
++	vki_off_t	st_size;
++	vki_blkcnt_t	st_blocks;
++	vki_blksize_t	st_blksize;
++	vki_fflags_t	st_flags;
++	vki_uint64_t	st_gen;
++	vki_int64_t	st_spare[10];
++//	struct vki_timespec	st_birthtimespec;
++//	unsigned int :(8 / 2) * (16 - (int)sizeof(struct vki_timespec));
++//	unsigned int :(8 / 2) * (16 - (int)sizeof(struct vki_timespec));
++};
+ 
+ //----------------------------------------------------------------------
+ // From linux-2.6.8.1/include/linux/sched.h
+@@ -941,6 +973,30 @@ struct vki_statfs {
+ 	char		f_mntonname[VKI_MNAMELEN];
+ };
+ 
++struct vki_statfs64 {
++	vki_uint32_t	f_version;
++	vki_uint32_t	f_type;
++	vki_uint64_t	f_flags;
++	vki_uint64_t	f_bsize;
++	vki_uint64_t	f_iosize;
++	vki_uint64_t	f_blocks;
++	vki_uint64_t	f_bfree;
++	vki_int64_t	f_bavail;
++	vki_uint64_t	f_files;
++	vki_int64_t	f_ffree;
++	vki_uint64_t	f_syncwrites;
++	vki_uint64_t	f_asyncwrites;
++	vki_uint64_t	f_syncreads;
++	vki_uint64_t	f_asyncreads;
++	vki_uint64_t	f_spare[10];
++	vki_uint32_t	f_namemax;
++	vki_uid_t	f_owner;
++	vki_fsid_t	f_fsid;
++	char		f_charspare[80];
++	char		f_fstypename[VKI_MFSNAMELEN];
++	char		f_mntfromnname[VKI_MNAMELEN];
++	char		f_mntonname[VKI_MNAMELEN];
++};
+ #define MAXFIDSZ        16
+ 
+ struct vki_fid {
+diff --git a/include/vki/vki-scnums-freebsd.h b/include/vki/vki-scnums-freebsd.h
+index 605a42f..ffa241d 100644
+--- a/include/vki/vki-scnums-freebsd.h
++++ b/include/vki/vki-scnums-freebsd.h
+@@ -412,6 +412,10 @@
+ #define	__NR_shmctl		512
+ #define __NR_accept4		541
+ #define	__NR_pipe2		542
++#define	__NR_fstat64		551
++#define	__NR_fstatat64		552
++#define	__NR_getdirentries64	554
++#define	__NR_fstatfs64		556
+ 
+ #define __NR_fake_sigreturn	1000
+ 
+-- 
+2.14.1
+

Modified: head/devel/valgrind/Makefile
==============================================================================
--- head/devel/valgrind/Makefile	Mon Oct 30 17:04:08 2017	(r453197)
+++ head/devel/valgrind/Makefile	Mon Oct 30 17:13:31 2017	(r453198)
@@ -4,7 +4,7 @@
 PORTNAME=	valgrind
 PORTVERSION=	3.10.1.20160113
 DISTVERSIONPREFIX=	freebsd-
-PORTREVISION=	4
+PORTREVISION=	5
 PORTEPOCH=	1
 CATEGORIES=	devel
 MASTER_SITES=	https://bitbucket.org/${BB_ACCOUNT}/${BB_PROJECT}/get/${BB_COMMIT}.tar.gz?dummy=/ \
@@ -60,6 +60,10 @@ WRKSRC=		${WRKDIR}/${BB_ACCOUNT}-${BB_PROJECT}-${BB_CO
 CONFIGURE_ENV+=	ac_cv_path_PERL=${PERL}
 
 .include <bsd.port.options.mk>
+
+.if ${OSVERSION} > 1200030
+EXTRA_PATCHES+=	${FILESDIR}/extra-patch-ino64:-p1
+.endif
 
 .if ${ARCH} == "amd64"
 PLIST_SUB+=	AMD64="" ARCH=amd64

Added: head/devel/valgrind/files/extra-patch-ino64
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/valgrind/files/extra-patch-ino64	Mon Oct 30 17:13:31 2017	(r453198)
@@ -0,0 +1,241 @@
+From 6aaeefab2490d56743ec49d0e20d3fd6ff45fb55 Mon Sep 17 00:00:00 2001
+From: Roman Bogorodskiy <bogorodskiy@gmail.com>
+Date: Sat, 9 Sep 2017 18:27:15 +0400
+Subject: [PATCH v2] ino64 support
+
+---
+ coregrind/m_syswrap/priv_syswrap-freebsd.h |  4 ++
+ coregrind/m_syswrap/syswrap-freebsd.c      | 65 ++++++++++++++++++++++++++++++
+ include/vki/vki-freebsd.h                  | 56 +++++++++++++++++++++++++
+ include/vki/vki-scnums-freebsd.h           |  4 ++
+ 4 files changed, 129 insertions(+)
+
+diff --git a/coregrind/m_syswrap/priv_syswrap-freebsd.h b/coregrind/m_syswrap/priv_syswrap-freebsd.h
+index 63d122f..715ad48 100644
+--- a/coregrind/m_syswrap/priv_syswrap-freebsd.h
++++ b/coregrind/m_syswrap/priv_syswrap-freebsd.h
+@@ -97,10 +97,12 @@ DECL_TEMPLATE(freebsd, sys_setegid);
+ DECL_TEMPLATE(freebsd, sys_seteuid);
+ DECL_TEMPLATE(freebsd, sys_stat);
+ DECL_TEMPLATE(freebsd, sys_fstat);
++DECL_TEMPLATE(freebsd, sys_fstat64);
+ DECL_TEMPLATE(freebsd, sys_lstat);
+ DECL_TEMPLATE(freebsd, sys_pathconf);
+ DECL_TEMPLATE(freebsd, sys_fpathconf);
+ DECL_TEMPLATE(freebsd, sys_getdirentries);
++DECL_TEMPLATE(freebsd, sys_getdirentries64);
+ DECL_TEMPLATE(freebsd, sys_mmap);
+ DECL_TEMPLATE(freebsd, sys___syscall);
+ DECL_TEMPLATE(freebsd, sys_lseek);
+@@ -208,6 +210,7 @@ DECL_TEMPLATE(freebsd, sys_kevent);
+ DECL_TEMPLATE(freebsd, sys_sendfile);
+ DECL_TEMPLATE(freebsd, sys_statfs6);
+ DECL_TEMPLATE(freebsd, sys_fstatfs6);
++DECL_TEMPLATE(freebsd, sys_fstatfs64);
+ DECL_TEMPLATE(freebsd, sys_fhstatfs6);
+ DECL_TEMPLATE(freebsd, sys_thr_exit);
+ DECL_TEMPLATE(freebsd, sys_thr_self);
+@@ -251,6 +254,7 @@ DECL_TEMPLATE(freebsd, sys_fchmodat);
+ DECL_TEMPLATE(freebsd, sys_fchownat);
+ DECL_TEMPLATE(freebsd, sys_fexecve);
+ DECL_TEMPLATE(freebsd, sys_fstatat);
++DECL_TEMPLATE(freebsd, sys_fstatat64);
+ DECL_TEMPLATE(freebsd, sys_futimesat);
+ DECL_TEMPLATE(freebsd, sys_linkat);
+ DECL_TEMPLATE(freebsd, sys_mkdirat);
+diff --git a/coregrind/m_syswrap/syswrap-freebsd.c b/coregrind/m_syswrap/syswrap-freebsd.c
+index bf6b1f1..978e98e 100644
+--- a/coregrind/m_syswrap/syswrap-freebsd.c
++++ b/coregrind/m_syswrap/syswrap-freebsd.c
+@@ -885,6 +885,18 @@ POST(sys_fstat)
+    POST_MEM_WRITE( ARG2, sizeof(struct vki_stat) );
+ }
+ 
++PRE(sys_fstat64)
++{
++   PRINT("sys_fstat64 ( %ld, %#lx )", ARG1, ARG2);
++   PRE_REG_READ2(long, "fstat", unsigned long, fd, struct stat *, buf);
++   PRE_MEM_WRITE( "fstat(buf)", ARG2, sizeof(struct vki_stat64) );
++}
++
++POST(sys_fstat64)
++{
++   POST_MEM_WRITE( ARG2, sizeof(struct vki_stat64) );
++}
++
+ PRE(sys_pathconf)
+ {
+    PRINT("sys_pathconf ( %#lx(%s), %ld )",ARG1,(char *)ARG1,ARG2);
+@@ -1029,6 +1041,26 @@ POST(sys_getdirentries)
+    }
+ }
+ 
++PRE(sys_getdirentries64)
++{
++   *flags |= SfMayBlock;
++   PRINT("sys_getdents ( %ld, %#lx, %ld )", ARG1,ARG2,ARG3);
++   PRE_REG_READ3(vki_ssize_t, "getdirentries",
++                 unsigned int, fd, struct dirent *, dirp,
++                 vki_size_t, count);
++   PRE_MEM_WRITE( "getdirentries(dirp)", ARG2, ARG3 );
++}
++
++POST(sys_getdirentries64)
++{
++   vg_assert(SUCCESS);
++   if (RES > 0) {
++      POST_MEM_WRITE( ARG2, RES );
++      if ( ARG4 != 0 )
++	 POST_MEM_WRITE( ARG4, sizeof (vki_off_t));
++   }
++}
++
+ PRE(sys_seteuid)
+ {
+    PRINT("sys_seteuid ( %ld )", ARG1);
+@@ -1251,6 +1283,19 @@ POST(sys_fstatfs6)
+    POST_MEM_WRITE( ARG2, sizeof(struct vki_statfs6) );
+ }
+ 
++PRE(sys_fstatfs64)
++{
++   PRINT("sys_fstatfs64 ( %ld, %#lx )", ARG1, ARG2);
++   PRE_REG_READ2(long, "fstatfs6",
++                 unsigned int, fd, struct statfs *, buf);
++   PRE_MEM_WRITE( "fstatfs6(buf)", ARG2, sizeof(struct vki_statfs64) );
++}
++
++POST(sys_fstatfs64)
++{
++   POST_MEM_WRITE( ARG2, sizeof(struct vki_statfs64) );
++}
++
+ PRE(sys_statfs6)
+ {
+    PRINT("sys_statfs6 ( %#lx(%s), %#lx )",ARG1,(char *)ARG1,ARG2);
+@@ -3132,6 +3177,20 @@ POST(sys_fstatat)
+    POST_MEM_WRITE( ARG3, sizeof(struct vki_stat) );
+ }
+ 
++PRE(sys_fstatat64)
++{
++   PRINT("sys_fstatat ( %ld, %#lx(%s), %#lx )", ARG1,ARG2,(char*)ARG2,ARG3);
++   PRE_REG_READ3(long, "fstatat",
++                 int, dfd, char *, file_name, struct stat *, buf);
++   PRE_MEM_RASCIIZ( "fstatat(file_name)", ARG2 );
++   PRE_MEM_WRITE( "fstatat(buf)", ARG3, sizeof(struct vki_stat) );
++}
++
++POST(sys_fstatat64)
++{
++   POST_MEM_WRITE( ARG3, sizeof(struct vki_stat) );
++}
++
+ PRE(sys_unlinkat)
+ {
+    *flags |= SfMayBlock;
+@@ -4427,6 +4486,12 @@ const SyscallTableEntry ML_(syscall_table)[] = {
+    BSDXY(__NR_accept4,           sys_accept4),            //541
+    BSDXY(__NR_pipe2,			sys_pipe2),			// 542
+ 
++   // ino64
++   BSDXY(__NR_fstat64,			sys_fstat64),			// 551
++   BSDXY(__NR_fstatat64,		sys_fstatat64),			// 552
++   BSDXY(__NR_getdirentries64,		sys_getdirentries64),		// 554
++   GENXY(__NR_fstatfs64,		sys_fstatfs),   		// 556
++
+    BSDX_(__NR_fake_sigreturn,		sys_fake_sigreturn),		// 1000, fake sigreturn
+ 
+ };
+diff --git a/include/vki/vki-freebsd.h b/include/vki/vki-freebsd.h
+index aee453e..f20833a 100644
+--- a/include/vki/vki-freebsd.h
++++ b/include/vki/vki-freebsd.h
+@@ -367,6 +367,38 @@ struct vki_stat {
+ 	unsigned int :(8 / 2) * (16 - (int)sizeof(struct vki_timespec));
+ };
+ 
++struct vki_stat64 {
++	vki_uint64_t	st_dev;
++	vki_uint64_t	st_ino;
++	vki_uint64_t	st_nlink;
++	vki_mode_t	st_mode;
++        vki_int16_t     st_padding0;
++	vki_uid_t	st_uid;
++	vki_gid_t	st_gid;
++        vki_int32_t     st_padding1;
++	vki_uint64_t	st_rdev;
++#if 0
++	struct vki_timespec	st_atimespec;
++	struct vki_timespec	st_mtimespec;
++	struct vki_timespec	st_ctimespec;
++#else
++	vki_time_t	st_atime;
++	long		st_atime_nsec;
++	vki_time_t	st_mtime;
++	long		st_mtime_nsec;
++	vki_time_t	st_ctime;
++	long		st_ctime_nsec;
++#endif
++	vki_off_t	st_size;
++	vki_blkcnt_t	st_blocks;
++	vki_blksize_t	st_blksize;
++	vki_fflags_t	st_flags;
++	vki_uint64_t	st_gen;
++	vki_int64_t	st_spare[10];
++//	struct vki_timespec	st_birthtimespec;
++//	unsigned int :(8 / 2) * (16 - (int)sizeof(struct vki_timespec));
++//	unsigned int :(8 / 2) * (16 - (int)sizeof(struct vki_timespec));
++};
+ 
+ //----------------------------------------------------------------------
+ // From linux-2.6.8.1/include/linux/sched.h
+@@ -941,6 +973,30 @@ struct vki_statfs {
+ 	char		f_mntonname[VKI_MNAMELEN];
+ };
+ 
++struct vki_statfs64 {
++	vki_uint32_t	f_version;
++	vki_uint32_t	f_type;
++	vki_uint64_t	f_flags;
++	vki_uint64_t	f_bsize;
++	vki_uint64_t	f_iosize;
++	vki_uint64_t	f_blocks;
++	vki_uint64_t	f_bfree;
++	vki_int64_t	f_bavail;
++	vki_uint64_t	f_files;
++	vki_int64_t	f_ffree;
++	vki_uint64_t	f_syncwrites;
++	vki_uint64_t	f_asyncwrites;
++	vki_uint64_t	f_syncreads;
++	vki_uint64_t	f_asyncreads;
++	vki_uint64_t	f_spare[10];
++	vki_uint32_t	f_namemax;
++	vki_uid_t	f_owner;
++	vki_fsid_t	f_fsid;
++	char		f_charspare[80];
++	char		f_fstypename[VKI_MFSNAMELEN];
++	char		f_mntfromnname[VKI_MNAMELEN];
++	char		f_mntonname[VKI_MNAMELEN];
++};
+ #define MAXFIDSZ        16
+ 
+ struct vki_fid {
+diff --git a/include/vki/vki-scnums-freebsd.h b/include/vki/vki-scnums-freebsd.h
+index 605a42f..ffa241d 100644
+--- a/include/vki/vki-scnums-freebsd.h
++++ b/include/vki/vki-scnums-freebsd.h
+@@ -412,6 +412,10 @@
+ #define	__NR_shmctl		512
+ #define __NR_accept4		541
+ #define	__NR_pipe2		542
++#define	__NR_fstat64		551
++#define	__NR_fstatat64		552
++#define	__NR_getdirentries64	554
++#define	__NR_fstatfs64		556
+ 
+ #define __NR_fake_sigreturn	1000
+ 
+-- 
+2.14.1
+



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710301713.v9UHDWF4073547>