Correct compilation of osnet/dev/dtrace/dtrace_hacks.c under Clang
Use __UNCONST() to remove const from an argument. This could be done with -W flags, but they are incompatible between compilers. This is a step forward functional MKLLVM=yes HAVE_LLVM=yes build. Sponsored by <The NetBSD Foundation>
This commit is contained in:
parent
03c04814f0
commit
9a546da821
@ -1,13 +1,15 @@
|
||||
/* $NetBSD: dtrace_hacks.c,v 1.6 2018/05/28 21:05:03 chs Exp $ */
|
||||
/* $NetBSD: dtrace_hacks.c,v 1.7 2018/06/06 15:54:03 kamil Exp $ */
|
||||
|
||||
/* $FreeBSD: head/sys/cddl/dev/dtrace/dtrace_hacks.c 281916 2015-04-24 03:19:30Z markj $ */
|
||||
/* XXX Hacks.... */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
dtrace_cacheid_t dtrace_predcache_id;
|
||||
|
||||
boolean_t
|
||||
priv_policy_only(const cred_t *cr, int b, boolean_t c)
|
||||
{
|
||||
|
||||
return kauth_authorize_generic(cr, KAUTH_GENERIC_ISSUSER, NULL) == 0;
|
||||
return kauth_authorize_generic(__UNCONST(cr), KAUTH_GENERIC_ISSUSER, NULL) == 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user