summaryrefslogtreecommitdiffstats
path: root/sal
diff options
context:
space:
mode:
authorKacper Kasper <kacperkasper@gmail.com>2018-09-20 19:19:33 +0200
committerCaolán McNamara <caolanm@redhat.com>2018-11-01 13:44:47 +0100
commit4326fb3ef3ddd7c6f9d08ba96add4f4736503ceb (patch)
tree5f4da9e38e2fc5a42836e37064e0608bf15d1f96 /sal
parentTweak stack protector check (diff)
downloadcore-4326fb3ef3ddd7c6f9d08ba96add4f4736503ceb.tar.gz
core-4326fb3ef3ddd7c6f9d08ba96add4f4736503ceb.zip
Fix build on Haiku
Change-Id: I4a21258c2405bd6e5c539ec0206e28a316c6ce13 Reviewed-on: https://gerrit.libreoffice.org/60835 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/pipe.cxx2
-rw-r--r--sal/osl/unx/socket.cxx4
-rw-r--r--sal/osl/unx/system.hxx2
-rw-r--r--sal/osl/unx/uunxapi.cxx2
4 files changed, 8 insertions, 2 deletions
diff --git a/sal/osl/unx/pipe.cxx b/sal/osl/unx/pipe.cxx
index 3af20aad5284..c38ab152dada 100644
--- a/sal/osl/unx/pipe.cxx
+++ b/sal/osl/unx/pipe.cxx
@@ -51,7 +51,9 @@ static struct
{ EPROTOTYPE, osl_Pipe_E_NoProtocol }, /* Protocol wrong type for socket */
{ ENOPROTOOPT, osl_Pipe_E_NoProtocol }, /* Protocol not available */
{ EPROTONOSUPPORT, osl_Pipe_E_NoProtocol }, /* Protocol not supported */
+#ifdef ESOCKTNOSUPPORT
{ ESOCKTNOSUPPORT, osl_Pipe_E_NoProtocol }, /* Socket type not supported */
+#endif
{ EPFNOSUPPORT, osl_Pipe_E_NoProtocol }, /* Protocol family not supported */
{ EAFNOSUPPORT, osl_Pipe_E_NoProtocol }, /* Address family not supported by */
/* protocol family */
diff --git a/sal/osl/unx/socket.cxx b/sal/osl/unx/socket.cxx
index 698de982e181..e4a70b5083a1 100644
--- a/sal/osl/unx/socket.cxx
+++ b/sal/osl/unx/socket.cxx
@@ -212,7 +212,9 @@ static const struct
{ EPROTOTYPE, osl_Socket_E_Prototype }, /* Protocol wrong type for socket */
{ ENOPROTOOPT, osl_Socket_E_NoProtocol }, /* Protocol not available */
{ EPROTONOSUPPORT, osl_Socket_E_ProtocolNoSupport }, /* Protocol not supported */
+#ifdef ESOCKTNOSUPPORT
{ ESOCKTNOSUPPORT, osl_Socket_E_TypeNoSupport }, /* Socket type not supported */
+#endif
{ EOPNOTSUPP, osl_Socket_E_OpNotSupport }, /* Operation not supported on socket */
{ EPFNOSUPPORT, osl_Socket_E_PfNoSupport }, /* Protocol family not supported */
{ EAFNOSUPPORT, osl_Socket_E_AfNoSupport }, /* Address family not supported by
@@ -229,7 +231,9 @@ static const struct
{ EISCONN, osl_Socket_E_IsConnected }, /* Socket is already connected */
{ ENOTCONN, osl_Socket_E_NotConnected }, /* Socket is not connected */
{ ESHUTDOWN, osl_Socket_E_Shutdown }, /* Can't send after socket shutdown */
+#ifdef ETOOMANYREFS
{ ETOOMANYREFS, osl_Socket_E_TooManyRefs }, /* Too many references: can't splice */
+#endif
{ ETIMEDOUT, osl_Socket_E_TimedOut }, /* Connection timed out */
{ ECONNREFUSED, osl_Socket_E_ConnRefused }, /* Connection refused */
{ EHOSTDOWN, osl_Socket_E_HostDown }, /* Host is down */
diff --git a/sal/osl/unx/system.hxx b/sal/osl/unx/system.hxx
index 6a92f291e833..57c418070a73 100644
--- a/sal/osl/unx/system.hxx
+++ b/sal/osl/unx/system.hxx
@@ -107,8 +107,6 @@
# 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
diff --git a/sal/osl/unx/uunxapi.cxx b/sal/osl/unx/uunxapi.cxx
index ea48309c3b94..c3cccabb4d9e 100644
--- a/sal/osl/unx/uunxapi.cxx
+++ b/sal/osl/unx/uunxapi.cxx
@@ -445,8 +445,10 @@ std::string UnixErrnoString(int nErrno)
return "EACCES";
case EFAULT:
return "EFAULT";
+#ifdef ENOTBLK
case ENOTBLK:
return "ENOTBLK";
+#endif
case EBUSY:
return "EBUSY";
case EEXIST: