Port: implement posix_fallocate wrapper
[babeltrace.git] / formats / ctf / ir / event-fields.c
index 829a44758c4a2d55224879d4f946dd88afdd78e8..aa7475d0952722512636af701237ba68a361a81c 100644 (file)
@@ -32,6 +32,7 @@
 #include <babeltrace/object-internal.h>
 #include <babeltrace/ref.h>
 #include <babeltrace/compiler.h>
+#include <babeltrace/compat/fcntl.h>
 
 #define PACKET_LEN_INCREMENT   (getpagesize() * 8 * CHAR_BIT)
 
@@ -1257,7 +1258,7 @@ struct bt_ctf_field *bt_ctf_field_structure_create(
                struct bt_ctf_field_structure, 1);
        struct bt_ctf_field *field = NULL;
 
-       if (!structure || !structure_type->fields->len) {
+       if (!structure) {
                goto end;
        }
 
@@ -2170,7 +2171,7 @@ int increase_packet_size(struct ctf_stream_pos *pos)
        }
 
        pos->packet_size += PACKET_LEN_INCREMENT;
-       ret = posix_fallocate(pos->fd, pos->mmap_offset,
+       ret = bt_posix_fallocate(pos->fd, pos->mmap_offset,
                pos->packet_size / CHAR_BIT);
        if (ret) {
                goto end;
This page took 0.024451 seconds and 4 git commands to generate.