summaryrefslogtreecommitdiff
path: root/sal/osl/unx/system.hxx
diff options
context:
space:
mode:
authorKacper Kasper <kacperkasper@gmail.com>2018-02-25 02:55:15 +0100
committerMichael Meeks <michael.meeks@collabora.com>2018-03-05 14:17:27 +0100
commit9c036b1d3db253a1fd43ce76ce1d919e2029af59 (patch)
tree6e5130faa9421c0c093059b5cff08a4356407d28 /sal/osl/unx/system.hxx
parent73312eaff10b19d1286c225ee335451e1800df4a (diff)
Make LibreOffice buildable on Haiku.
* Obviously VCL wiring is missing, but most components do build. Change-Id: Ie853ada1423a8f4c2b647be59cd47a7730c42978 Reviewed-on: https://gerrit.libreoffice.org/50293 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'sal/osl/unx/system.hxx')
-rw-r--r--sal/osl/unx/system.hxx35
1 files changed, 34 insertions, 1 deletions
diff --git a/sal/osl/unx/system.hxx b/sal/osl/unx/system.hxx
index a822b0a83a10..6a92f291e833 100644
--- a/sal/osl/unx/system.hxx
+++ b/sal/osl/unx/system.hxx
@@ -85,6 +85,38 @@
#endif
+#ifdef HAIKU
+# include <shadow.h>
+# include <pthread.h>
+# include <sys/file.h>
+# include <sys/ioctl.h>
+# include <sys/uio.h>
+# include <sys/un.h>
+# include <netinet/tcp.h>
+# include <dlfcn.h>
+# include <endian.h>
+# include <sys/time.h>
+# define IORESOURCE_TRANSFER_BSD
+# define IOCHANNEL_TRANSFER_BSD_RENO
+# define pthread_testcancel()
+# define NO_PTHREAD_PRIORITY
+# define NO_PTHREAD_RTL
+# define PTHREAD_SIGACTION pthread_sigaction
+
+# ifndef ETIME
+# define ETIME ETIMEDOUT
+# endif
+# define SIGIOT SIGABRT
+# define ESOCKTNOSUPPORT ENOTSUP
+# define ETOOMANYREFS EOPNOTSUPP
+# define SOCK_RDM 0
+// hack: Haiku defines SOL_SOCKET as -1, but this makes GCC complain about
+// narrowing conversion
+# undef SOL_SOCKET
+# define SOL_SOCKET (sal_uInt32) -1
+
+#endif
+
#if defined(ANDROID)
# include <pthread.h>
# include <sys/file.h>
@@ -242,7 +274,8 @@ int macxp_resolveAlias(char *path, int buflen);
!defined(AIX) && \
!defined(__sun) && !defined(MACOSX) && \
!defined(OPENBSD) && !defined(DRAGONFLY) && \
- !defined(IOS) && !defined(ANDROID)
+ !defined(IOS) && !defined(ANDROID) && \
+ !defined(HAIKU)
# error "Target platform not specified!"
#endif