mirror of
https://github.com/celisej567/source-engine.git
synced 2026-01-03 05:49:41 +03:00
Fix macOS build (#146)
* Fix macOS build * Fix *BSD build * Add missing *BSD include
This commit is contained in:
@@ -15,7 +15,8 @@
|
||||
#include <Psapi.h>
|
||||
#endif
|
||||
|
||||
#if defined( OSX ) || defined(BSD)
|
||||
#if defined( OSX ) || defined(PLATFORM_BSD)
|
||||
#include <sys/types.h>
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
|
||||
@@ -278,7 +279,7 @@ static void posix_signal_handler( int i )
|
||||
#define DO_TRY if ( sigsetjmp( g_mark, 1 ) == 0 )
|
||||
#define DO_CATCH else
|
||||
|
||||
#if defined( OSX ) || defined(BSD)
|
||||
#if defined( OSX ) || defined(PLATFORM_BSD)
|
||||
#define __sighandler_t sig_t
|
||||
#endif
|
||||
|
||||
@@ -537,7 +538,7 @@ public:
|
||||
FreeLibrary( hInst );
|
||||
}
|
||||
|
||||
#elif defined( OSX ) || defined(BSD)
|
||||
#elif defined( OSX ) || defined(PLATFORM_BSD)
|
||||
|
||||
static const struct
|
||||
{
|
||||
@@ -548,7 +549,7 @@ public:
|
||||
#define _XTAG( _x ) { _x, #_x }
|
||||
_XTAG( HW_PHYSMEM ),
|
||||
_XTAG( HW_USERMEM ),
|
||||
#ifdef BSD
|
||||
#ifdef PLATFORM_BSD
|
||||
_XTAG( HW_PHYSMEM ),
|
||||
_XTAG( HW_NCPU ),
|
||||
#else
|
||||
@@ -566,7 +567,7 @@ public:
|
||||
|
||||
if ( sysctl( mib, Q_ARRAYSIZE( mib ), &val, &len, NULL, 0 ) == 0 )
|
||||
{
|
||||
CommentPrintf( " %s: %" PRIu64 "\n", s_ctl_names[ i ].name, val );
|
||||
CommentPrintf( " %s: %d\n", s_ctl_names[ i ].name, val );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user