diff options
author | jstebbins <[email protected]> | 2015-01-18 17:25:51 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2015-01-18 17:25:51 +0000 |
commit | d972a8646edc79e7f4e373c51dc2fb77233989f2 (patch) | |
tree | 9dfa9dd68cc8d4141f2b573d726f949bdc28a8ab /libhb | |
parent | 9250daa1b69db695007f2b43ae19ec2d66112ef9 (diff) |
Work around fedora mingw pthread library requirement
Fedora mingw seems to require it's own pthread library which causes build
conflicts with our pthread lib. So this patch distinguishes whether
libpthread or libpthreadGC2 is already installed on the system and uses
the appropriate system lib when found.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6766 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb')
-rw-r--r-- | libhb/module.defs | 9 | ||||
-rw-r--r-- | libhb/ports.c | 4 |
2 files changed, 11 insertions, 2 deletions
diff --git a/libhb/module.defs b/libhb/module.defs index a6eb72fe9..473a058ca 100644 --- a/libhb/module.defs +++ b/libhb/module.defs @@ -53,7 +53,10 @@ else ifeq ($(BUILD.system),darwin) else ifeq ($(BUILD.system),linux) LIBHB.GCC.D += SYS_LINUX _LARGEFILE_SOURCE _FILE_OFFSET_BITS=64 else ifeq ($(BUILD.system),mingw) - LIBHB.GCC.D += SYS_MINGW PTW32_STATIC_LIB + LIBHB.GCC.D += SYS_MINGW +ifeq ($(HAS.pthreadGC2),1) + LIBHB.GCC.D += PTW32_STATIC_LIB +endif LIBHB.GCC.args.extra.dylib++ += -Wl,--enable-auto-import -static else ifeq ($(BUILD.system),solaris) LIBHB.GCC.D += SYS_SunOS _LARGEFILE_SOURCE _FILE_OFFSET_BITS=64 _POSIX_C_SOURCE=200112L __EXTENSIONS__ @@ -140,7 +143,9 @@ else LIBHB.GCC.l += fribidi endif -ifneq ($(HAS.pthread),1) +ifeq ($(HAS.pthread),1) + LIBHB.GCC.l += pthread +else ifneq ($(HAS.pthreadGC2),1) LIBHB.dll.libs += $(CONTRIB.build/)lib/libpthreadGC2.a else LIBHB.GCC.l += pthreadGC2 diff --git a/libhb/ports.c b/libhb/ports.c index bb7c235a2..d519f593c 100644 --- a/libhb/ports.c +++ b/libhb/ports.c @@ -697,7 +697,11 @@ static uint64_t hb_thread_to_integer( const hb_thread_t* t ) #if defined( SYS_CYGWIN ) return (uint64_t)t->thread; #elif defined( _WIN32 ) || defined( __MINGW32__ ) + #if defined(PTW32_STATIC_LIB) return (uint64_t)(ptrdiff_t)t->thread.p; + #else + return (uint64_t)t->thread; + #endif #elif defined( SYS_DARWIN ) return (unsigned long)t->thread; #else |