X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=types%2Fstruct.c;h=d3e9f3c484cd11e88aeed88daeb4003a03623c5b;hp=a1bfbf431055539b610791c221144c4dec6da4e4;hb=be85c1c7633af07e35db7b415d6ee8447c30e80a;hpb=4c8bfb7e0a9cef6e74cefa38ed54bf8cbd424183 diff --git a/types/struct.c b/types/struct.c index a1bfbf43..d3e9f3c4 100644 --- a/types/struct.c +++ b/types/struct.c @@ -19,6 +19,10 @@ #include #include +#ifndef max +#define max(a, b) ((a) < (b) ? (b) : (a)) +#endif + void struct_copy(struct stream_pos *dest, const struct format *fdest, struct stream_pos *src, const struct format *fsrc, const struct type_class *type_class) @@ -85,7 +89,7 @@ struct type_class_struct *struct_type_new(const char *name) type_class->ref = 1; if (type_class->name) { - ret = ctf_register_type(type_class); + ret = register_type(type_class); if (ret) goto error_register; }