Module: wine Branch: master Commit: 02e6f7d146a35b5a86655c1c1e562f458bfbb74c URL: http://source.winehq.org/git/wine.git/?a=commit;h=02e6f7d146a35b5a86655c1c1e...
Author: André Hentschel nerv@dawncrow.de Date: Mon Jan 6 02:31:08 2014 +0100
libwine: Added LDT support for GNU/Hurd.
Based on a patch by Andrew Nguyen.
---
libs/wine/ldt.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/libs/wine/ldt.c b/libs/wine/ldt.c index 5175e9c..0946407 100644 --- a/libs/wine/ldt.c +++ b/libs/wine/ldt.c @@ -92,6 +92,11 @@ static inline int set_thread_area( struct modify_ldt_s *ptr ) #include <machine/sysarch.h> #endif /* __NetBSD__ || __FreeBSD__ || __OpenBSD__ */
+#ifdef __GNU__ +#include <mach/i386/mach_i386.h> +#include <mach/mach_traps.h> +#endif + #ifdef __APPLE__ #include <i386/user_ldt.h> #endif @@ -203,6 +208,9 @@ static int internal_set_entry( unsigned short sel, const LDT_ENTRY *entry ) #elif defined(__APPLE__) if ((ret = i386_set_ldt(index, (union ldt_entry *)entry, 1)) < 0) perror("i386_set_ldt"); +#elif defined(__GNU__) + if ((ret = i386_set_ldt(mach_thread_self(), sel, (descriptor_list_t)entry, 1)) != KERN_SUCCESS) + perror("i386_set_ldt"); #else fprintf( stderr, "No LDT support on this platform\n" ); exit(1);