summaryrefslogtreecommitdiffstats
path: root/package/mplayer/0006-musl-ldt.patch
blob: 8165f6f56ae0bb25c5805e564ec02ec3f54b6cf0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Fixes musl build error

loader/ldt_keeper.o: In function `Setup_LDT_Keeper':
ldt_keeper.c:(.text+0xab): undefined reference to `modify_ldt'

Downloaded from
https://github.com/dimkr/rlsd2/blob/master/rules/mplayer/musl.patch

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>

diff -rup MPlayer-1.1.1-orig/loader/ldt_keeper.c MPlayer-1.1.1/loader/ldt_keeper.c
--- MPlayer-1.1.1-orig/loader/ldt_keeper.c	2015-04-23 15:07:09.580805888 +0300
+++ MPlayer-1.1.1/loader/ldt_keeper.c	2015-04-23 15:08:07.736807270 +0300
@@ -47,7 +47,7 @@
 #if defined(__GLIBC__) &&  (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 0))
 _syscall3( int, modify_ldt, int, func, void *, ptr, unsigned long, bytecount );
 #else
-int modify_ldt(int func, void *ptr, unsigned long bytecount);
+#define modify_ldt(func, ptr, bytecount) syscall(__NR_modify_ldt, func, ptr, bytecount)
 #endif
 #else
 #if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
OpenPOWER on IntegriCloud