patch-src_stage_output_c 726 B

1234567891011121314151617181920
  1. --- strace-5.15.orig/src/stage_output.c 2021-02-16 09:00:00.000000000 +0100
  2. +++ strace-5.15/src/stage_output.c 2021-12-15 15:05:58.500813814 +0100
  3. @@ -26,7 +26,7 @@ strace_open_memstream(struct tcb *tcp)
  4. {
  5. FILE *fp = NULL;
  6. -#if HAVE_OPEN_MEMSTREAM
  7. +#if defined(HAVE_OPEN_MEMSTREAM)
  8. tcp->staged_output_data = xmalloc(sizeof(*tcp->staged_output_data));
  9. fp = open_memstream(&tcp->staged_output_data->memfptr,
  10. &tcp->staged_output_data->memfloc);
  11. @@ -49,7 +49,7 @@ strace_open_memstream(struct tcb *tcp)
  12. void
  13. strace_close_memstream(struct tcb *tcp, bool publish)
  14. {
  15. -#if HAVE_OPEN_MEMSTREAM
  16. +#if defined(HAVE_OPEN_MEMSTREAM)
  17. if (!tcp->staged_output_data) {
  18. debug_msg("memstream already closed");
  19. return;