X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=lib%2Fctf-writer%2Fserialize.c;h=11ce8b443531a5783dc6d8a80bff101ba0b4ff8f;hb=108e5a1e5e7d7037061bc84acf148e8558074b3e;hp=f20ad405cb99cdcebbb76ac1a4f9ae0c53d9e6a7;hpb=71c7c95f0b9d976a66d3f74aacccd3d1537e6e05;p=babeltrace.git diff --git a/lib/ctf-writer/serialize.c b/lib/ctf-writer/serialize.c index f20ad405..11ce8b44 100644 --- a/lib/ctf-writer/serialize.c +++ b/lib/ctf-writer/serialize.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #if (FLT_RADIX != 2) @@ -284,7 +285,7 @@ void bt_ctf_stream_pos_packet_seek(struct bt_ctf_stream_pos *pos, size_t index, /* The writer will add padding */ pos->mmap_offset += pos->packet_size / CHAR_BIT; - pos->packet_size = getpagesize() * 8 * CHAR_BIT; + pos->packet_size = PACKET_LEN_INCREMENT; do { ret = bt_posix_fallocate(pos->fd, pos->mmap_offset, pos->packet_size / CHAR_BIT);