Correct compilation of osnet/dist/cmd/dtrace/dtrace.c under Clang

Add missing const keywords.

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:
kamil 2018-06-06 14:46:58 +00:00
parent 54f848644c
commit 8627ada168

View File

@ -555,7 +555,7 @@ static void
print_probe_info(const dtrace_probeinfo_t *p)
{
char buf[BUFSIZ];
char *user;
const char *user;
int i;
oprintf("\n\tProbe Description Attributes\n");
@ -1164,8 +1164,8 @@ go(void)
int i;
struct {
char *name;
char *optname;
const char *name;
const char *optname;
dtrace_optval_t val;
} bufs[] = {
{ "buffer size", "bufsize" },
@ -1221,7 +1221,7 @@ go(void)
for (i = 0; rates[i].name != NULL; i++) {
dtrace_optval_t nval;
char *dir;
const char *dir;
if (rates[i].val == DTRACEOPT_UNSET)
continue;