diff options
Diffstat (limited to 'src/journal/journal-qrcode.c')
-rw-r--r-- | src/journal/journal-qrcode.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/journal/journal-qrcode.c b/src/journal/journal-qrcode.c index 4e194bd809..5a9dcaa525 100644 --- a/src/journal/journal-qrcode.c +++ b/src/journal/journal-qrcode.c @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: LGPL-2.1+ */ /*** This file is part of systemd. @@ -21,6 +22,7 @@ #include <qrencode.h> #include <stdbool.h> #include <stdio.h> +#include <stdio_ext.h> #include <stdlib.h> #include "journal-qrcode.h" @@ -65,11 +67,13 @@ int print_qr_code( if (!f) return -ENOMEM; - fputs_unlocked("fss://", f); + (void) __fsetlocking(f, FSETLOCKING_BYCALLER); + + fputs("fss://", f); for (i = 0; i < seed_size; i++) { if (i > 0 && i % 3 == 0) - fputc_unlocked('-', f); + fputc('-', f); fprintf(f, "%02x", ((uint8_t*) seed)[i]); } |