44 lines
1.1 KiB
Diff
44 lines
1.1 KiB
Diff
|
From dadcbd6a04a77ccfaa38cbfa3f1ebd05942b7c24 Mon Sep 17 00:00:00 2001
|
||
|
From: Juan RP <xtraeme@voidlinux.eu>
|
||
|
Date: Fri, 6 May 2016 09:12:39 +0200
|
||
|
Subject: [PATCH] glinject/elfhacks.h: fix compilation with the musl C library.
|
||
|
|
||
|
- __ELF_NATIVE_CLASS is not declared anywhere on musl.
|
||
|
- ElfW is already declared in <link.h>.
|
||
|
|
||
|
Removed the BSD conditional because checking if the macros are
|
||
|
defined is imho a better way to know if they are available.
|
||
|
---
|
||
|
glinject/elfhacks.h | 8 ++++++--
|
||
|
1 file changed, 6 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/glinject/elfhacks.h b/glinject/elfhacks.h
|
||
|
index 973d8bb..3c351e2 100644
|
||
|
--- glinject/elfhacks.h
|
||
|
+++ glinject/elfhacks.h
|
||
|
@@ -48,15 +48,19 @@ extern "C" {
|
||
|
#if defined(__elf64)
|
||
|
# define ELFW_R_SYM ELF64_R_SYM
|
||
|
# define ElfW_Sword Elf64_Sxword
|
||
|
-# ifdef BSD
|
||
|
+# ifndef ElfW
|
||
|
# define ElfW(v) Elf64_##v
|
||
|
+# endif
|
||
|
+# ifndef __ELF_NATIVE_CLASS
|
||
|
# define __ELF_NATIVE_CLASS 64
|
||
|
# endif
|
||
|
#elif defined(__elf32)
|
||
|
# define ELFW_R_SYM ELF32_R_SYM
|
||
|
# define ElfW_Sword Elf32_Sword
|
||
|
-# ifdef BSD
|
||
|
+# ifndef ElfW
|
||
|
# define ElfW(v) Elf32_##v
|
||
|
+# endif
|
||
|
+# ifndef __ELF_NATIVE_CLASS
|
||
|
# define __ELF_NATIVE_CLASS 32
|
||
|
# endif
|
||
|
#else
|
||
|
--
|
||
|
2.8.2
|
||
|
|