ssr: update musl patch with the one submitted upstream.

https://github.com/MaartenBaert/ssr/pull/451
This commit is contained in:
Juan RP 2016-05-06 09:18:52 +02:00
parent a9d30d4bee
commit f92d344107
3 changed files with 44 additions and 20 deletions

View file

@ -0,0 +1,43 @@
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

View file

@ -1,19 +0,0 @@
--- glinject/elfhacks.h.orig 2016-05-02 09:43:59.940521673 +0200
+++ glinject/elfhacks.h 2016-05-02 09:44:35.563864890 +0200
@@ -48,14 +48,14 @@ extern "C" {
#if defined(__elf64)
# define ELFW_R_SYM ELF64_R_SYM
# define ElfW_Sword Elf64_Sxword
-# ifdef BSD
+# if defined(BSD) || defined(__linux__) && !defined(__GLIBC__)
# define ElfW(v) Elf64_##v
# define __ELF_NATIVE_CLASS 64
# endif
#elif defined(__elf32)
# define ELFW_R_SYM ELF32_R_SYM
# define ElfW_Sword Elf32_Sword
-# ifdef BSD
+# if defined(BSD) || defined(__linux__) && !defined(__GLIBC__)
# define ElfW(v) Elf32_##v
# define __ELF_NATIVE_CLASS 32
# endif

View file

@ -1,7 +1,7 @@
# Template file for 'ssr'
pkgname=ssr
version=0.3.6
revision=2
revision=3
build_style=gnu-configure
configure_args="--with-qt5"
hostmakedepends="pkg-config"