diff options
Diffstat (limited to 'scripts/tracetool')
-rw-r--r-- | scripts/tracetool/backend/dtrace.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/tracetool/backend/dtrace.py b/scripts/tracetool/backend/dtrace.py index b7fe4c1b50..fc0c8fc52f 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: |