From 7cb0f6dee74007f11288b18deae4e54d30e23754 Mon Sep 17 00:00:00 2001 From: Zaoqi Date: Sun, 15 Dec 2019 15:47:06 +0800 Subject: [PATCH 1/3] fix build issue on Alpinelinux --- src/light_elf.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/light_elf.h b/src/light_elf.h index d6044a711..ca0f95e59 100644 --- a/src/light_elf.h +++ b/src/light_elf.h @@ -26,7 +26,9 @@ #include -__BEGIN_DECLS +#ifdef _cplusplus +extern "C" { +#endif typedef uint16_t Elf32_Half; typedef uint16_t Elf64_Half; @@ -114,6 +116,8 @@ typedef struct elf32_note { #define EI_CLASS 4 #define EI_DATA 5 -__END_DECLS +#ifdef _cplusplus +extern "C" } +#endif #endif /* elf.h */ From 366cd6a8c461769d8754907a27d4580a85582a8d Mon Sep 17 00:00:00 2001 From: Zaoqi Date: Sun, 15 Dec 2019 15:49:17 +0800 Subject: [PATCH 2/3] typo --- src/light_elf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/light_elf.h b/src/light_elf.h index ca0f95e59..110030125 100644 --- a/src/light_elf.h +++ b/src/light_elf.h @@ -117,7 +117,7 @@ typedef struct elf32_note { #define EI_DATA 5 #ifdef _cplusplus -extern "C" } +} #endif #endif /* elf.h */ From 76f5edaca36100c272052f68d10c4254f5ad2fe8 Mon Sep 17 00:00:00 2001 From: Zaoqi Date: Fri, 20 Dec 2019 18:38:30 +0800 Subject: [PATCH 3/3] Update light_elf.h --- src/light_elf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/light_elf.h b/src/light_elf.h index 110030125..f13b9817b 100644 --- a/src/light_elf.h +++ b/src/light_elf.h @@ -26,7 +26,7 @@ #include -#ifdef _cplusplus +#ifdef __cplusplus extern "C" { #endif @@ -116,7 +116,7 @@ typedef struct elf32_note { #define EI_CLASS 4 #define EI_DATA 5 -#ifdef _cplusplus +#ifdef __cplusplus } #endif