Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/cddl/osnet/dev/dtrace Correct compilation of osnet/...



details:   https://anonhg.NetBSD.org/src/rev/6b6e17fe67db
branches:  trunk
changeset: 319651:6b6e17fe67db
user:      kamil <kamil%NetBSD.org@localhost>
date:      Wed Jun 06 15:54:03 2018 +0000

description:
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>

diffstat:

 external/cddl/osnet/dev/dtrace/dtrace_hacks.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r 445fbace21d5 -r 6b6e17fe67db external/cddl/osnet/dev/dtrace/dtrace_hacks.c
--- a/external/cddl/osnet/dev/dtrace/dtrace_hacks.c     Wed Jun 06 15:24:57 2018 +0000
+++ b/external/cddl/osnet/dev/dtrace/dtrace_hacks.c     Wed Jun 06 15:54:03 2018 +0000
@@ -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;
 }



Home | Main Index | Thread Index | Old Index