mirror of https://github.com/FreeRDP/FreeRDP
ifreerdp: fix iOS/OSX platform detection
This commit is contained in:
parent
8f310980ca
commit
cea8c08328
|
@ -6,3 +6,5 @@ bin/
|
|||
build/
|
||||
project.pbxproj
|
||||
!iFreeRDP.xcodeproj/
|
||||
iFreeRDP.app/
|
||||
|
||||
|
|
|
@ -154,19 +154,28 @@
|
|||
|
||||
/* GNU/Linux (__gnu_linux__) */
|
||||
|
||||
/* Mac OS X (__MACOSX__) */
|
||||
/* Apple Platforms (iOS, Mac OS X) */
|
||||
|
||||
#if (defined(__APPLE__) && defined(__MACH__))
|
||||
|
||||
#include <TargetConditionals.h>
|
||||
|
||||
#if (TARGET_OS_IPHONE == 1) || (TARGET_IPHONE_SIMULATOR == 1)
|
||||
|
||||
/* iOS (__IOS__) */
|
||||
|
||||
#ifndef __IOS__
|
||||
#define __IOS__ 1
|
||||
#endif
|
||||
|
||||
#elif (TARGET_OS_MAC == 1)
|
||||
|
||||
/* Mac OS X (__MACOSX__) */
|
||||
|
||||
#ifndef __MACOSX__
|
||||
#define __MACOSX__ 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* iOS (__IOS__)*/
|
||||
|
||||
#if (defined(__APPLE__) && defined(TARGET_OS_IPHONE))
|
||||
#ifndef __IOS__
|
||||
#define __IOS__ 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -37,7 +37,9 @@
|
|||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef __MACOSX__
|
||||
#if defined(__IOS__)
|
||||
|
||||
#elif defined(__MACOSX__)
|
||||
#include <crt_externs.h>
|
||||
#define environ (*_NSGetEnviron())
|
||||
#endif
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
#include <winpr/crt.h>
|
||||
#include <winpr/platform.h>
|
||||
|
||||
#if defined(__MACOSX__) || \
|
||||
#if defined(__MACOSX__) || defined(__IOS__) || \
|
||||
defined(__FreeBSD__) || defined(__NetBSD__) || \
|
||||
defined(__OpenBSD__) || defined(__DragonFly__)
|
||||
#include <sys/sysctl.h>
|
||||
|
|
Loading…
Reference in New Issue