diff options
Diffstat (limited to 'cddl/contrib/opensolaris/lib/libdtrace/common/dt_program.c')
-rw-r--r-- | cddl/contrib/opensolaris/lib/libdtrace/common/dt_program.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_program.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_program.c index 8497dab..1785668 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_program.c +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_program.c @@ -32,7 +32,9 @@ #include <errno.h> #include <assert.h> #include <ctype.h> +#if defined(sun) #include <alloca.h> +#endif #include <dt_impl.h> #include <dt_program.h> @@ -151,6 +153,7 @@ int dtrace_program_exec(dtrace_hdl_t *dtp, dtrace_prog_t *pgp, dtrace_proginfo_t *pip) { + dtrace_enable_io_t args; void *dof; int n, err; @@ -159,7 +162,9 @@ dtrace_program_exec(dtrace_hdl_t *dtp, dtrace_prog_t *pgp, if ((dof = dtrace_dof_create(dtp, pgp, DTRACE_D_STRIP)) == NULL) return (-1); - n = dt_ioctl(dtp, DTRACEIOC_ENABLE, dof); + args.dof = dof; + args.n_matched = 0; + n = dt_ioctl(dtp, DTRACEIOC_ENABLE, &args); dtrace_dof_destroy(dtp, dof); if (n == -1) { @@ -181,7 +186,7 @@ dtrace_program_exec(dtrace_hdl_t *dtp, dtrace_prog_t *pgp, } if (pip != NULL) - pip->dpi_matches += n; + pip->dpi_matches += args.n_matched; return (0); } |