diff options
author | jb <jb@FreeBSD.org> | 2008-04-26 04:44:34 +0000 |
---|---|---|
committer | jb <jb@FreeBSD.org> | 2008-04-26 04:44:34 +0000 |
commit | 2d46247bf5a4194423d2e06c3357c7e869bd9a11 (patch) | |
tree | 7f4de609f134b2a36a7e1bc4adf7000c36c8169a | |
parent | ace3d24b37f446c59218c0e389d579c0b79fccc0 (diff) | |
download | FreeBSD-src-2d46247bf5a4194423d2e06c3357c7e869bd9a11.zip FreeBSD-src-2d46247bf5a4194423d2e06c3357c7e869bd9a11.tar.gz |
* Handle the different ioctl design.
* Make the file compile cleanly.
-rw-r--r-- | cddl/contrib/opensolaris/lib/libdtrace/common/dt_map.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_map.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_map.c index 1536186..1c5c868 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_map.c +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_map.c @@ -82,7 +82,11 @@ dt_epid_add(dtrace_hdl_t *dtp, dtrace_epid_t id) enabled->dtepd_epid = id; enabled->dtepd_nrecs = 1; +#if defined(sun) if (dt_ioctl(dtp, DTRACEIOC_EPROBE, enabled) == -1) { +#else + if (dt_ioctl(dtp, DTRACEIOC_EPROBE, &enabled) == -1) { +#endif rval = dt_set_errno(dtp, errno); free(enabled); return (rval); @@ -102,7 +106,11 @@ dt_epid_add(dtrace_hdl_t *dtp, dtrace_epid_t id) if ((enabled = nenabled) == NULL) return (dt_set_errno(dtp, EDT_NOMEM)); +#if defined(sun) rval = dt_ioctl(dtp, DTRACEIOC_EPROBE, enabled); +#else + rval = dt_ioctl(dtp, DTRACEIOC_EPROBE, &enabled); +#endif if (rval == -1) { rval = dt_set_errno(dtp, errno); @@ -322,7 +330,11 @@ dt_aggid_add(dtrace_hdl_t *dtp, dtrace_aggid_t id) agg->dtagd_id = id; agg->dtagd_nrecs = 1; +#if defined(sun) if (dt_ioctl(dtp, DTRACEIOC_AGGDESC, agg) == -1) { +#else + if (dt_ioctl(dtp, DTRACEIOC_AGGDESC, &agg) == -1) { +#endif rval = dt_set_errno(dtp, errno); free(agg); return (rval); @@ -341,7 +353,11 @@ dt_aggid_add(dtrace_hdl_t *dtp, dtrace_aggid_t id) if ((agg = nagg) == NULL) return (dt_set_errno(dtp, EDT_NOMEM)); +#if defined(sun) rval = dt_ioctl(dtp, DTRACEIOC_AGGDESC, agg); +#else + rval = dt_ioctl(dtp, DTRACEIOC_AGGDESC, &agg); +#endif if (rval == -1) { rval = dt_set_errno(dtp, errno); @@ -359,7 +375,7 @@ dt_aggid_add(dtrace_hdl_t *dtp, dtrace_aggid_t id) * provide the compiler-generated aggregation information. */ if (dtp->dt_options[DTRACEOPT_GRABANON] == DTRACEOPT_UNSET && - agg->dtagd_rec[0].dtrd_uarg != NULL) { + agg->dtagd_rec[0].dtrd_uarg != 0) { dtrace_stmtdesc_t *sdp; dt_ident_t *aid; |