X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=converter%2Fbabeltrace-log.c;h=6ac94e69236c3cb7f29d806aa0369b63bf5b2d4b;hp=ac66a8b08d878e2be09548be0320d2a3bb0321fc;hb=b4b292cc76e04e9efda111e492251d8e7aefe451;hpb=a4dfa07bd488d4dd77e558ad9e611415441183e7 diff --git a/converter/babeltrace-log.c b/converter/babeltrace-log.c index ac66a8b0..6ac94e69 100644 --- a/converter/babeltrace-log.c +++ b/converter/babeltrace-log.c @@ -20,6 +20,7 @@ * Depends on glibc 2.10 for getline(). */ +#define _GNU_SOURCE #include #include #include @@ -31,13 +32,12 @@ #include #include #include -#include #include -#include #include #include #include +#include #define USEC_PER_SEC 1000000UL @@ -46,7 +46,7 @@ int babeltrace_debug, babeltrace_verbose; static char *s_outputname; static int s_timestamp; static int s_help; -static uuid_t s_uuid; +static unsigned char s_uuid[BABELTRACE_UUID_LEN]; /* Metadata format string */ static const char metadata_fmt[] = @@ -104,7 +104,7 @@ void print_metadata(FILE *fp) } static -void write_packet_header(struct ctf_stream_pos *pos, uuid_t uuid) +void write_packet_header(struct ctf_stream_pos *pos, unsigned char *uuid) { struct ctf_stream_pos dummy; @@ -125,8 +125,8 @@ void write_packet_header(struct ctf_stream_pos *pos, uuid_t uuid) assert(!ctf_pos_packet(&dummy)); ctf_align_pos(pos, sizeof(uint8_t) * CHAR_BIT); - memcpy(ctf_get_pos_addr(pos), uuid, 16); - ctf_move_pos(pos, 16 * CHAR_BIT); + memcpy(ctf_get_pos_addr(pos), uuid, BABELTRACE_UUID_LEN); + ctf_move_pos(pos, BABELTRACE_UUID_LEN * CHAR_BIT); } static @@ -337,7 +337,7 @@ int main(int argc, char **argv) goto error_closemetadatafd; } - uuid_generate(s_uuid); + babeltrace_uuid_generate(s_uuid); print_metadata(metadata_fp); trace_text(stdin, fd);