From: DeaDDooMER Date: Sun, 6 Oct 2019 10:14:43 +0000 (+0300) Subject: fix building for osx X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=645d02199259b5e43745df45f027c46e09293dbe;p=d2df-sdl.git fix building for osx --- diff --git a/src/game/g_net.pas b/src/game/g_net.pas index eaf35fa..c01efd1 100644 --- a/src/game/g_net.pas +++ b/src/game/g_net.pas @@ -72,7 +72,7 @@ const BANLIST_FILENAME = 'banlist.txt'; NETDUMP_FILENAME = 'netdump'; - {$IFDEF FREEBSD} + {$IF DEFINED(FREEBSD) OR DEFINED(DARWIN)} NilThreadId = nil; {$ELSE} NilThreadId = 0; diff --git a/src/lib/enet/enet.pp b/src/lib/enet/enet.pp index e50109f..f0c27be 100644 --- a/src/lib/enet/enet.pp +++ b/src/lib/enet/enet.pp @@ -36,9 +36,16 @@ // because just external is case insensitive, but fuck it {$ENDIF} {$ELSE} - {$DEFINE libraryLibENetDecl := cdecl} - {$DEFINE libraryLibENetImp := cdecl; external 'enet'} - {$DEFINE libraryLibENetVar := cvar; external 'enet'} + {$IFDEF DARWIN} + {$LINKLIB libenet.a} + {$DEFINE libraryLibENetDecl := cdecl} + {$DEFINE libraryLibENetImp := cdecl; external} + {$DEFINE libraryLibENetVar := cvar; external} + {$ELSE} + {$DEFINE libraryLibENetDecl := cdecl} + {$DEFINE libraryLibENetImp := cdecl; external 'enet'} + {$DEFINE libraryLibENetVar := cvar; external 'enet'} + {$ENDIF} {$ENDIF}