From 890f911e17169e44b43fe98742540267093559ea Mon Sep 17 00:00:00 2001 From: Heiko Becker Date: Fri, 18 Aug 2023 18:23:56 +0200 Subject: [PATCH] Replace __{BEGIN,END}_DECLS with #ifdef __cplusplus Fixes the build with musl libc. --- libmisc/readpassphrase.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libmisc/readpassphrase.h b/libmisc/readpassphrase.h index 2462ecc3..2530b7fe 100644 --- a/libmisc/readpassphrase.h +++ b/libmisc/readpassphrase.h @@ -36,8 +36,12 @@ #endif #include -__BEGIN_DECLS +#ifdef __cplusplus +extern "C" { +#endif char * readpassphrase(const char *, char *, size_t, int); -__END_DECLS +#ifdef __cplusplus +} +#endif #endif /* !LIBBSD_READPASSPHRASE_H */