Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 May 2019 21:40:28 +0000 (UTC)
From:      Alan Somers <asomers@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r348281 - in projects/fuse2: share/mk sys/fs/fuse tests/sys/fs
Message-ID:  <201905252140.x4PLeSFw009063@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: asomers
Date: Sat May 25 21:40:27 2019
New Revision: 348281
URL: https://svnweb.freebsd.org/changeset/base/348281

Log:
  fusefs: misc build fixes
  
  * Only build the tests on platforms with C++14 support
  * Fix an undefined symbol error on lint builds
  * Remove an unused function: fiov_clear
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  projects/fuse2/share/mk/bsd.compiler.mk
  projects/fuse2/sys/fs/fuse/fuse_internal.c
  projects/fuse2/sys/fs/fuse/fuse_ipc.c
  projects/fuse2/tests/sys/fs/Makefile

Modified: projects/fuse2/share/mk/bsd.compiler.mk
==============================================================================
--- projects/fuse2/share/mk/bsd.compiler.mk	Sat May 25 20:53:23 2019	(r348280)
+++ projects/fuse2/share/mk/bsd.compiler.mk	Sat May 25 21:40:27 2019	(r348281)
@@ -19,6 +19,7 @@
 # COMPILER_FEATURES will contain one or more of the following, based on
 # compiler support for that feature:
 #
+# - c++14:     supports full (or nearly full) C++14 programming environment.
 # - c++11:     supports full (or nearly full) C++11 programming environment.
 # - retpoline: supports the retpoline speculative execution vulnerability
 #              mitigation.
@@ -200,6 +201,10 @@ ${X_}COMPILER_FREEBSD_VERSION=	unknown
 .endif
 
 ${X_}COMPILER_FEATURES=
+.if ${${X_}COMPILER_TYPE} == "clang" || \
+	(${${X_}COMPILER_TYPE} == "gcc" && ${${X_}COMPILER_VERSION} >= 50000)
+${X_}COMPILER_FEATURES+=	c++14
+.endif
 .if ${${X_}COMPILER_TYPE} == "clang" || \
 	(${${X_}COMPILER_TYPE} == "gcc" && ${${X_}COMPILER_VERSION} >= 40800)
 ${X_}COMPILER_FEATURES+=	c++11

Modified: projects/fuse2/sys/fs/fuse/fuse_internal.c
==============================================================================
--- projects/fuse2/sys/fs/fuse/fuse_internal.c	Sat May 25 20:53:23 2019	(r348280)
+++ projects/fuse2/sys/fs/fuse/fuse_internal.c	Sat May 25 21:40:27 2019	(r348281)
@@ -208,7 +208,7 @@ fuse_internal_cache_attrs(struct vnode *vp, struct ucr
 	if (!cred)
 		cred = curthread->td_ucred;
 
-	ASSERT_VOP_ELOCKED(*vpp, "fuse_internal_cache_attrs");
+	ASSERT_VOP_ELOCKED(vp, "fuse_internal_cache_attrs");
 
 	fuse_validity_2_bintime(attr_valid, attr_valid_nsec,
 		&fvdat->attr_cache_timeout);

Modified: projects/fuse2/sys/fs/fuse/fuse_ipc.c
==============================================================================
--- projects/fuse2/sys/fs/fuse/fuse_ipc.c	Sat May 25 20:53:23 2019	(r348280)
+++ projects/fuse2/sys/fs/fuse/fuse_ipc.c	Sat May 25 21:40:27 2019	(r348281)
@@ -94,7 +94,6 @@ SDT_PROBE_DEFINE2(fusefs, , ipc, trace, "int", "char*"
 
 static void fdisp_make_pid(struct fuse_dispatcher *fdip, enum fuse_opcode op,
     struct fuse_data *data, uint64_t nid, pid_t pid, struct ucred *cred);
-static void fiov_clear(struct fuse_iov *fiov);
 static void fuse_interrupt_send(struct fuse_ticket *otick, int err);
 static struct fuse_ticket *fticket_alloc(struct fuse_data *data);
 static void fticket_refresh(struct fuse_ticket *ftick);
@@ -296,13 +295,6 @@ fiov_adjust(struct fuse_iov *fiov, size_t size)
 		bzero((char*)fiov->base + fiov->len, size - fiov->len);
 	}
 	fiov->len = size;
-}
-
-/* Clear the fiov's data buffer */
-static void
-fiov_clear(struct fuse_iov *fiov)
-{
-	bzero(fiov->base, fiov->len);
 }
 
 /* Resize the fiov if needed, and clear it's buffer */

Modified: projects/fuse2/tests/sys/fs/Makefile
==============================================================================
--- projects/fuse2/tests/sys/fs/Makefile	Sat May 25 20:53:23 2019	(r348280)
+++ projects/fuse2/tests/sys/fs/Makefile	Sat May 25 21:40:27 2019	(r348281)
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <bsd.compiler.mk>
+
 PACKAGE=		tests
 
 TESTSDIR=		${TESTSBASE}/sys/fs
@@ -7,7 +9,9 @@ TESTSDIR=		${TESTSBASE}/sys/fs
 TESTSRC=		${SRCTOP}/contrib/netbsd-tests/fs
 
 #TESTS_SUBDIRS+=	nullfs	# XXX: needs rump
+.if ${COMPILER_FEATURES:Mc++14}
 TESTS_SUBDIRS+=		fusefs
+.endif
 TESTS_SUBDIRS+=		tmpfs
 
 ${PACKAGE}FILES+=	h_funcs.subr



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