perf tools: Check if libtracevent has TEP_FIELD_IS_RELATIVE
[linux-2.6-microblaze.git] / tools / perf / util / data-convert-bt.c
index 8031b58..b842273 100644 (file)
@@ -322,8 +322,10 @@ static int add_tracepoint_field_value(struct ctf_writer *cw,
                offset = tmp_val;
                len = offset >> 16;
                offset &= 0xffff;
+#ifdef HAVE_LIBTRACEEVENT_TEP_FIELD_IS_RELATIVE
                if (flags & TEP_FIELD_IS_RELATIVE)
                        offset += fmtf->offset + fmtf->size;
+#endif
        }
 
        if (flags & TEP_FIELD_IS_ARRAY) {