From 095052c60103d25fcbb16c1396e0a27254770df6 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 7 Dec 2019 10:27:28 -0800 Subject: [PATCH 1/2] Remove __BEGIN_DECLS/__END_DECLS The __BEGIN_DECLS and __END_DECLS are internal identifiers in glibc and are not defined in any standard. Using them fails build on musl libc, its better to avoid them Signed-off-by: Khem Raj --- src/syslog.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/syslog.h b/src/syslog.h index 4fb7627..120a18f 100644 --- a/src/syslog.h +++ b/src/syslog.h @@ -221,7 +221,9 @@ struct syslog_data { .log_mask = 0xff, \ } -__BEGIN_DECLS +#ifdef __cplusplus +extern "C" { +#endif void openlog (const char *, int, int); void closelog (void); @@ -245,7 +247,9 @@ void syslogp_r (int, struct syslog_data *, const char *, const char *, const char *, ...); void vsyslogp_r (int, struct syslog_data *, const char *, const char *, const char *, va_list); -__END_DECLS +#ifdef __cplusplus +} +#endif #else /* !__KERNEL__ */ From d3d18505d07f465902695c0770b0647db65375bd Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 7 Dec 2019 10:31:04 -0800 Subject: [PATCH 2/2] include sys/types.h for off_t Fixes error: unknown type name 'off_t' Signed-off-by: Khem Raj --- src/compat.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compat.h b/src/compat.h index a867636..1ef1bf0 100644 --- a/src/compat.h +++ b/src/compat.h @@ -34,6 +34,7 @@ #include #include #include +#include /* * The following macro is used to remove const cast-away warnings