Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Apr 2019 16:58:38 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r346322 - head/lib/libcasper/services/cap_fileargs
Message-ID:  <201904171658.x3HGwckd080598@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Wed Apr 17 16:58:38 2019
New Revision: 346322
URL: https://svnweb.freebsd.org/changeset/base/346322

Log:
  [casper] fix compilation when casper is disabled.
  
  This triggers an error in gcc-mips 6.4.0 complaining about unused arguments.
  
  Tested:
  
  * compiled/run on mips32; nothing complained.

Modified:
  head/lib/libcasper/services/cap_fileargs/cap_fileargs.h

Modified: head/lib/libcasper/services/cap_fileargs/cap_fileargs.h
==============================================================================
--- head/lib/libcasper/services/cap_fileargs/cap_fileargs.h	Wed Apr 17 16:45:42 2019	(r346321)
+++ head/lib/libcasper/services/cap_fileargs/cap_fileargs.h	Wed Apr 17 16:58:38 2019	(r346322)
@@ -108,8 +108,12 @@ fileargs_cinitnv(cap_channel_t *cas __unused, nvlist_t
 	lstat(name, sb)
 #define	fileargs_open(fa, name)							\
 	open(name, fa->fa_flags, fa->fa_mode)
-#define	fileargs_fopen(fa, name, mode)						\
-	fopen(name, mode)
+static inline
+FILE *fileargs_fopen(fileargs_t *fa, const char *name, const char *mode)
+{
+	(void) fa;
+	return (fopen(name, mode));
+}
 #define	fileargs_free(fa)	(free(fa))
 #endif
 



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