summaryrefslogtreecommitdiff
path: root/sal/osl/unx
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2012-03-12 11:03:02 +0200
committerTor Lillqvist <tml@iki.fi>2012-03-13 02:44:00 +0200
commit2b2804b9560a436c764143dbc6b2fe451d16a131 (patch)
tree6b3c628b0b0b5636dee596b079917b9428b5bb78 /sal/osl/unx
parentbbe99e9c7b28b9e68e0fda5f853542cd9b07f659 (diff)
Use _NSGetExecutablePath also on iOS
Diffstat (limited to 'sal/osl/unx')
-rw-r--r--sal/osl/unx/process_impl.cxx6
1 files changed, 1 insertions, 5 deletions
diff --git a/sal/osl/unx/process_impl.cxx b/sal/osl/unx/process_impl.cxx
index 168b9be617ec..94128a2d29f2 100644
--- a/sal/osl/unx/process_impl.cxx
+++ b/sal/osl/unx/process_impl.cxx
@@ -77,7 +77,7 @@ extern "C" oslProcessError SAL_CALL osl_bootstrap_getExecutableFile_Impl (
) SAL_THROW_EXTERN_C();
-#if defined(MACOSX)
+#if defined(MACOSX) || defined(IOS)
#include <mach-o/dyld.h>
oslProcessError SAL_CALL osl_bootstrap_getExecutableFile_Impl (
@@ -89,11 +89,7 @@ oslProcessError SAL_CALL osl_bootstrap_getExecutableFile_Impl (
char buffer[PATH_MAX];
size_t buflen = sizeof(buffer);
-#if defined(__GNUC__) && defined(MACOSX)
if (_NSGetExecutablePath (buffer, (uint32_t*)&buflen) == 0)
-#else
- if (_NSGetExecutablePath (buffer, &buflen) == 0)
-#endif
{
/* Determine absolute path. */
char abspath[PATH_MAX];