From c41749b124c526c4acd375fca55e8a99b6c32579 Mon Sep 17 00:00:00 2001 From: nlfx <69880003+nlfx@users.noreply.github.com> Date: Mon, 1 Nov 2021 03:31:26 +0100 Subject: [PATCH] Fix OMEMO /sendfile on non-glibc systems --- src/command/cmd_funcs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index c61b5c44..9256a933 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -4859,7 +4859,7 @@ _add_omemo_stream(int* fd, FILE** fh, char** err) *err = "Unable to create temporary file for encrypted transfer."; return NULL; } - FILE* tmpfh = fdopen(tmpfd, "wb"); + FILE* tmpfh = fdopen(tmpfd, "w+b"); // The temporary ciphertext file should be removed after it has // been closed.