+2018-11-14 Jerome Lambourg <lambourg@adacore.com>
+
+ * env.c: Do not include crt_externs.h on iOS, as it does not
+ exist there. This is also true for the iPhone Simulator SDK.
+
2018-11-14 Ed Schonberg <schonberg@adacore.com>
* exp_ch7.adb (Check_Unnesting_In_Declarations): New procedure
#include <stdlib.h>
#endif
-#if defined (__APPLE__) && !(defined (__arm__) || defined (__arm64__))
+#if defined (__APPLE__) \
+ && !(defined (__arm__) \
+ || defined (__arm64__) \
+ || defined (__IOS_SIMULATOR__))
/* On Darwin, _NSGetEnviron must be used for shared libraries; but it is not
- available on iOS. */
+ available on iOS (on device or on simulator). */
#include <crt_externs.h>
#endif
#elif defined (__sun__)
extern char **_environ;
return _environ;
-#elif defined (__APPLE__) && !(defined (__arm__) || defined (__arm64__))
+#elif defined (__APPLE__) \
+ && !(defined (__arm__) \
+ || defined (__arm64__) \
+ || defined (__IOS_SIMULATOR__))
return *_NSGetEnviron ();
#elif ! (defined (__vxworks))
extern char **environ;