From 3982d8792609aa05e276a3df04756e59c5625d0c Mon Sep 17 00:00:00 2001 From: kamil Date: Wed, 6 Jun 2018 17:19:49 +0000 Subject: [PATCH] Correct compilation of osnet/dev/profile/profile.c under Clang Constify char* types when initialized with liternals. 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 --- external/cddl/osnet/dev/profile/profile.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/external/cddl/osnet/dev/profile/profile.c b/external/cddl/osnet/dev/profile/profile.c index cfc59579a48b..7c2be5385f52 100644 --- a/external/cddl/osnet/dev/profile/profile.c +++ b/external/cddl/osnet/dev/profile/profile.c @@ -1,4 +1,4 @@ -/* $NetBSD: profile.c,v 1.8 2018/05/28 21:05:03 chs Exp $ */ +/* $NetBSD: profile.c,v 1.9 2018/06/06 17:19:49 kamil Exp $ */ /* * CDDL HEADER START @@ -434,7 +434,7 @@ profile_provide(void *arg, dtrace_probedesc_t *desc) char *name, *suffix = NULL; const struct { - char *prefix; + const char *prefix; int kind; } types[] = { { PROF_PREFIX_PROFILE, PROF_PROFILE }, @@ -443,7 +443,7 @@ profile_provide(void *arg, dtrace_probedesc_t *desc) }; const struct { - char *name; + const char *name; hrtime_t mult; } suffixes[] = { { "ns", NANOSEC / NANOSEC },