Skip to content

Commit e56c21b

Browse files
gholmann16TheAssassin
authored andcommitted
Make compilation musl compatible
1 parent 6a3669f commit e56c21b

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

src/libappimage/libappimage.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include <string.h>
3131
#include <stdlib.h>
3232
#include <dirent.h>
33+
#include <limits.h>
3334

3435
#include "xdg-basedir.h"
3536

src/libappimage/utils/light_elf.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626

2727
#include <inttypes.h>
2828

29-
__BEGIN_DECLS
29+
#ifdef __cplusplus
30+
extern "C" {
31+
#endif
3032

3133
typedef uint16_t Elf32_Half;
3234
typedef uint16_t Elf64_Half;
@@ -114,6 +116,8 @@ typedef struct elf32_note {
114116
#define EI_CLASS 4
115117
#define EI_DATA 5
116118

117-
__END_DECLS
119+
#ifdef __cplusplus
120+
}
121+
#endif
118122

119123
#endif /* elf.h */

src/libappimage_shared/light_elf.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626

2727
#include <inttypes.h>
2828

29-
__BEGIN_DECLS
29+
#ifdef __cplusplus
30+
extern "C" {
31+
#endif
3032

3133
typedef uint16_t Elf32_Half;
3234
typedef uint16_t Elf64_Half;
@@ -114,6 +116,8 @@ typedef struct elf32_note {
114116
#define EI_CLASS 4
115117
#define EI_DATA 5
116118

117-
__END_DECLS
119+
#ifdef __cplusplus
120+
}
121+
#endif
118122

119123
#endif /* elf.h */

0 commit comments

Comments
 (0)