summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@strace.io>2023-05-10 08:00:00 +0000
committerDmitry V. Levin <ldv@strace.io>2023-05-10 08:00:00 +0000
commit6387801953c6d04fac0fcc86db23507774a706c8 (patch)
treed1a31dcc532d667e7e67d67c555a0031fa8d1490
parent91e521b97ed6e04a0cf77ea6981be5a923649dd9 (diff)
downloadstrace-6387801953c6d04fac0fcc86db23507774a706c8.tar.gz
build: fix build on systems that do not provide open_memstream
* src/stage_output.c (strace_open_memstream, strace_close_memstream): Fix HAVE_OPEN_MEMSTREAM check.
-rw-r--r--src/stage_output.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stage_output.c b/src/stage_output.c
index 810877762..8f4016354 100644
--- a/src/stage_output.c
+++ b/src/stage_output.c
@@ -26,7 +26,7 @@ strace_open_memstream(struct tcb *tcp)
{
FILE *fp = NULL;
-#if HAVE_OPEN_MEMSTREAM
+#ifdef HAVE_OPEN_MEMSTREAM
tcp->staged_output_data = xmalloc(sizeof(*tcp->staged_output_data));
fp = open_memstream(&tcp->staged_output_data->memfptr,
&tcp->staged_output_data->memfloc);
@@ -49,7 +49,7 @@ strace_open_memstream(struct tcb *tcp)
void
strace_close_memstream(struct tcb *tcp, bool publish)
{
-#if HAVE_OPEN_MEMSTREAM
+#ifdef HAVE_OPEN_MEMSTREAM
if (!tcp->staged_output_data) {
debug_msg("memstream already closed");
return;