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
This commit is contained in:
Alan Somers 2019-05-25 21:40:27 +00:00
parent e97ae4ad2d
commit 93fecd02a1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/projects/fuse2/; revision=348281
4 changed files with 10 additions and 9 deletions

View File

@ -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

View File

@ -208,7 +208,7 @@ fuse_internal_cache_attrs(struct vnode *vp, struct ucred *cred,
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);

View File

@ -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);
@ -298,13 +297,6 @@ fiov_adjust(struct fuse_iov *fiov, size_t size)
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 */
void
fiov_refresh(struct fuse_iov *fiov)

View File

@ -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