diff options
author | nobutaka <nobutaka@FreeBSD.org> | 2003-12-09 21:11:54 +0800 |
---|---|---|
committer | nobutaka <nobutaka@FreeBSD.org> | 2003-12-09 21:11:54 +0800 |
commit | ede803535c6080b0754e6e9b463899b7aa26f02b (patch) | |
tree | e1c5cdb5a20c28c8614ac99bab2e9ed9a294ce22 /multimedia/libxine | |
parent | dc23e73da113a7e543c210bf3c9d08757703398d (diff) | |
download | freebsd-ports-gnome-ede803535c6080b0754e6e9b463899b7aa26f02b.tar.gz freebsd-ports-gnome-ede803535c6080b0754e6e9b463899b7aa26f02b.tar.zst freebsd-ports-gnome-ede803535c6080b0754e6e9b463899b7aa26f02b.zip |
Fix crash with libkse / libthr.
PR: ports/59930
Submitted by: deischen
Diffstat (limited to 'multimedia/libxine')
-rw-r--r-- | multimedia/libxine/Makefile | 2 | ||||
-rw-r--r-- | multimedia/libxine/files/patch-src:libw32dll:ldt_keeper.c | 52 |
2 files changed, 53 insertions, 1 deletions
diff --git a/multimedia/libxine/Makefile b/multimedia/libxine/Makefile index 0b1e2bfbe480..ab5a5cf6241e 100644 --- a/multimedia/libxine/Makefile +++ b/multimedia/libxine/Makefile @@ -7,7 +7,7 @@ PORTNAME= xine PORTVERSION= 1.0.r2 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= multimedia MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} diff --git a/multimedia/libxine/files/patch-src:libw32dll:ldt_keeper.c b/multimedia/libxine/files/patch-src:libw32dll:ldt_keeper.c new file mode 100644 index 000000000000..ecc747cae2c4 --- /dev/null +++ b/multimedia/libxine/files/patch-src:libw32dll:ldt_keeper.c @@ -0,0 +1,52 @@ +--- src/libw32dll/wine/ldt_keeper.c.orig Sat Oct 11 12:22:18 2003 ++++ src/libw32dll/wine/ldt_keeper.c Tue Dec 2 19:49:23 2003 +@@ -138,7 +138,7 @@ + #define TEB_SEL_IDX 1024 + #endif + +-#define TEB_SEL LDT_SEL(TEB_SEL_IDX) ++static unsigned int teb_sel = LDT_SEL(TEB_SEL_IDX); + + #ifdef __cplusplus + extern "C" +@@ -146,7 +146,7 @@ + void Setup_FS_Segment(void) + { + __asm__ __volatile__( +- "movl %0,%%eax; movw %%ax, %%fs" : : "i" (TEB_SEL) : "%eax" ++ "movl %0,%%eax; movw %%ax, %%fs" : : "r" (teb_sel) : "%eax" + ); + } + +@@ -158,7 +158,7 @@ + ); + fs = fs & 0xffff; + +- if( fs != TEB_SEL ) { ++ if( fs != teb_sel ) { + printf("ldt_keeper: FS segment is not set or has being lost!\n"); + printf(" Please report this error to xine-devel@sourceforge.net\n"); + printf(" Aborting....\n"); +@@ -230,7 +230,13 @@ + unsigned long d[2]; + + LDT_EntryToBytes( d, &array ); ++#if defined(__FreeBSD__) && defined(LDT_AUTO_ALLOC) ++ ret = i386_set_ldt(LDT_AUTO_ALLOC, (union descriptor *)d, 1); ++ array.entry_number = ret; ++ teb_sel = ret; ++#else + ret = i386_set_ldt(array.entry_number, (union descriptor *)d, 1); ++#endif + if (ret < 0) + { + perror("install_fs"); +@@ -244,7 +250,7 @@ + #if defined(__svr4__) + { + struct ssd ssd; +- ssd.sel = TEB_SEL; ++ ssd.sel = teb_sel; + ssd.bo = array.base_addr; + ssd.ls = array.limit - array.base_addr; + ssd.acc1 = ((array.read_exec_only == 0) << 1) | |