aboutsummaryrefslogtreecommitdiff
path: root/scripts/tracetool/backend/dtrace.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/tracetool/backend/dtrace.py')
-rw-r--r--scripts/tracetool/backend/dtrace.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/tracetool/backend/dtrace.py b/scripts/tracetool/backend/dtrace.py
index b7fe4c1..fc0c8fc 100644
--- a/scripts/tracetool/backend/dtrace.py
+++ b/scripts/tracetool/backend/dtrace.py
@@ -44,11 +44,15 @@ def generate_h_begin(events, group):
# require SDT_USE_VARIADIC to be defined. If dtrace includes <sys/sdt.h>
# first without defining SDT_USE_VARIADIC then ust breaks because the
# STAP_PROBEV() macro is not defined.
+ out('#ifndef SDT_USE_VARIADIC')
out('#define SDT_USE_VARIADIC 1')
+ out('#endif')
out('#include "%s"' % header,
'')
+ out('#undef SDT_USE_VARIADIC')
+
# SystemTap defines <provider>_<name>_ENABLED() but other DTrace
# implementations might not.
for e in events: