summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2015-02-04 17:41:55 +0100
committerTor Lillqvist <tml@collabora.com>2015-02-04 18:04:40 +0100
commitac8a2dee02032db2523888927f7973b219f3a9a9 (patch)
tree108e29c1b8b4a401e59b6e855f9658eefbc3b19b /include
parent57853ab7ace0ccc2c2953d7153fdce8d1be3c20d (diff)
Adapt for iOS, too
Change-Id: Ic5c6d6501d477544c6e4a4d6bb2510b6a5a92956
Diffstat (limited to 'include')
-rw-r--r--include/LibreOfficeKit/LibreOfficeKitInit.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/LibreOfficeKit/LibreOfficeKitInit.h b/include/LibreOfficeKit/LibreOfficeKitInit.h
index b6552a269f8f..a6599fd59a80 100644
--- a/include/LibreOfficeKit/LibreOfficeKitInit.h
+++ b/include/LibreOfficeKit/LibreOfficeKitInit.h
@@ -17,7 +17,7 @@ extern "C"
{
#endif
-#if defined(__linux__) || defined (__FreeBSD_kernel__) || defined(_AIX) || defined(_WIN32)
+#if defined(__linux__) || defined (__FreeBSD_kernel__) || defined(_AIX) || defined(_WIN32) || defined(__APPLE__)
#include <stdio.h>
#include <stdlib.h>
@@ -117,10 +117,12 @@ typedef LibreOfficeKit *(HookFunction)( const char *install_path);
static LibreOfficeKit *lok_init( const char *install_path )
{
char *imp_lib;
- size_t partial_length;
void *dlhandle;
HookFunction *pSym;
+#if !(defined(__APPLE__) && defined(__arm__))
+ size_t partial_length;
+
if (!install_path)
return NULL;
@@ -154,6 +156,10 @@ static LibreOfficeKit *lok_init( const char *install_path )
return NULL;
}
}
+#else
+ imp_lib = strdup("the app executable");
+ dlhandle = RTLD_MAIN_ONLY;
+#endif
pSym = (HookFunction *) _dlsym( dlhandle, "libreofficekit_hook" );
if (!pSym)
@@ -168,7 +174,7 @@ static LibreOfficeKit *lok_init( const char *install_path )
return pSym( install_path );
}
-#endif // defined(__linux__) || defined(_AIX)
+#endif // defined(__linux__) || defined (__FreeBSD_kernel__) || defined(_AIX) || defined(_WIN32) || defined(__APPLE__)
#ifdef __cplusplus
}