Skip to content

Commit

Permalink
Merge pull request #208 from zrj-rimwis/d1512_add_netradiant
Browse files Browse the repository at this point in the history
games/netradiant: fix build
  • Loading branch information
jrmarino committed Dec 5, 2015
2 parents 2fb7ba6 + 2ebd8d2 commit 01a2588
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ports/games/netradiant/Makefile.DragonFly
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

dfly-patch:
${REINPLACE_CMD} -e 's@\(Linux FreeBSD\)@\1 DragonFly@g' \
${WRKSRC}/Makefile
${REINPLACE_CMD} -e 's@\(defined( __FreeBSD__ )\)@(\1 || defined(__DragonFly__))@g' \
${WRKSRC}/radiant/url.cpp
${REINPLACE_CMD} -e 's@\(defined(__FreeBSD__)\)@(\1 || defined(__DragonFly__))@g' \
${WRKSRC}/contrib/bobtoolz/misc.cpp
${REINPLACE_CMD} -e 's@\(defined ( __FreeBSD__ )\)@(\1 || defined(__DragonFly__))@g' \
${WRKSRC}/radiant/mainframe.cpp \
${WRKSRC}/radiant/watchbsp.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

Taken-from: contrib/gold/gold-threads.cc

--- tools/quake2/qdata_heretic2/common/threads.c.bak 2015-12-05 14:53:30.000000000 +0200
+++ tools/quake2/qdata_heretic2/common/threads.c
@@ -539,12 +539,14 @@ void RunThreadsOn( int workcnt, qboolean
if ( pthread_mutexattr_init( &mattrib ) != 0 ) {
Error( "pthread_mutexattr_init failed" );
}
+#ifndef __DragonFly__
#if __GLIBC_MINOR__ == 1
if ( pthread_mutexattr_settype( &mattrib, PTHREAD_MUTEX_FAST_NP ) != 0 )
#else
if ( pthread_mutexattr_settype( &mattrib, PTHREAD_MUTEX_ADAPTIVE_NP ) != 0 )
#endif
{ Error( "pthread_mutexattr_settype failed" ); }
+#endif
recursive_mutex_init( mattrib );

for ( i = 0 ; i < numthreads ; i++ )

0 comments on commit 01a2588

Please sign in to comment.