From 58b96645c93395c7a109aa6e43cb5fff2c5b4647 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. Cherry-picked-from: 890f911e17169e44b43fe98742540267093559ea Link: Reviewed-by: Michael Vetter Signed-off-by: Alejandro Colomar --- lib/readpassphrase.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/readpassphrase.h b/lib/readpassphrase.h index 2462ecc3..2530b7fe 100644 --- a/lib/readpassphrase.h +++ b/lib/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 */