compat: fix compilation with !BABELTRACE_HAVE_OPEN_MEMSTREAM
When commenting out BABELTRACE_HAVE_OPEN_MEMSTREAM in config.h, to test
the alternative implementation of bt_open_memstream, I get:
CC decoder.lo
In file included from /home/simark/src/babeltrace/src/plugins/ctf/common/metadata/decoder.c:20:
/home/simark/src/babeltrace/src/compat/memstream.h: In function ‘bt_open_memstream’:
/home/simark/src/babeltrace/src/compat/memstream.h:257:15: error: implicit declaration of function ‘unlink’ [-Werror=implicit-function-declaration]
257 | ret = unlink(tmpname);
| ^~~~~~
Fix that by including unistd.h.
Change-Id: Iaa44bc51846a0b8c9e16fdc24d42aef0c5ad0aca
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/7107
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
This page took 0.023926 seconds and 4 git commands to generate.