From: Jérémie Galarneau Date: Wed, 18 May 2016 20:05:19 +0000 (-0400) Subject: Fix: posix_fadvise wrapper returns -ENOSYS on FreeBSD X-Git-Tag: v2.6.3~23 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=6a381a6ef90d2068731064cc42d5f6eeb6483c3f;p=lttng-tools.git Fix: posix_fadvise wrapper returns -ENOSYS on FreeBSD Signed-off-by: Jérémie Galarneau --- diff --git a/src/common/consumer.c b/src/common/consumer.c index 37c73e7f7..3802eff65 100644 --- a/src/common/consumer.c +++ b/src/common/consumer.c @@ -1254,8 +1254,9 @@ void lttng_consumer_sync_trace_file(struct lttng_consumer_stream *stream, */ ret = posix_fadvise(outfd, orig_offset - stream->max_sb_size, stream->max_sb_size, POSIX_FADV_DONTNEED); - if (ret) { - WARN("posix_fadvise() error (%i)", ret); + if (ret && ret != -ENOSYS) { + errno = -ret; + PERROR("posix_fadvise"); } }