Module Name:    src
Committed By:   kamil
Date:           Wed Jun  6 15:54:03 UTC 2018

Modified Files:
        src/external/cddl/osnet/dev/dtrace: dtrace_hacks.c

Log Message:
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>


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/cddl/osnet/dev/dtrace/dtrace_hacks.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/cddl/osnet/dev/dtrace/dtrace_hacks.c
diff -u src/external/cddl/osnet/dev/dtrace/dtrace_hacks.c:1.6 src/external/cddl/osnet/dev/dtrace/dtrace_hacks.c:1.7
--- src/external/cddl/osnet/dev/dtrace/dtrace_hacks.c:1.6	Mon May 28 21:05:03 2018
+++ src/external/cddl/osnet/dev/dtrace/dtrace_hacks.c	Wed Jun  6 15:54:03 2018
@@ -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;
 }

Reply via email to