From 9fda6bfa915d55a7b1b584690eb5168c81389248 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Thu, 21 Mar 2019 17:03:52 +0100
Subject: fix build


diff --git a/src/arch/sdl/archdep_beos.h b/src/arch/sdl/archdep_beos.h
index 4e64ea4..7ede0ec 100644
--- a/src/arch/sdl/archdep_beos.h
+++ b/src/arch/sdl/archdep_beos.h
@@ -109,6 +109,23 @@
 #define archdep_signals_pipe_set()
 #define archdep_signals_pipe_unset()
 
+#ifdef MACOSX_SUPPORT
+#define MAKE_SO_NAME_VERSION_PROTO(name, version)  "lib" #name "." #version ".dylib"
+#else
+#define MAKE_SO_NAME_VERSION_PROTO(name, version)  "lib" #name ".so." #version
+#endif
+
+/* add second level macro to allow expansion and stringification */
+#define ARCHDEP_MAKE_SO_NAME_VERSION(n, v) MAKE_SO_NAME_VERSION_PROTO(n, v)
+
+#ifdef MACOSX_SUPPORT
+#define ARCHDEP_OPENCBM_SO_NAME  "libopencbm.dylib"
+#define ARCHDEP_LAME_SO_NAME     "libmp3lame.dylib"
+#else
+#define ARCHDEP_OPENCBM_SO_NAME  "libopencbm.so"
+#define ARCHDEP_LAME_SO_NAME     "libmp3lame.so"
+#endif
+
 /* what to use to return an error when a socket error happens */
 #define ARCHDEP_SOCKET_ERROR errno
 
diff --git a/src/arch/sdl/dynlib.c b/src/arch/sdl/dynlib.c
index 47e7cab..4b7b959 100644
--- a/src/arch/sdl/dynlib.c
+++ b/src/arch/sdl/dynlib.c
@@ -28,7 +28,7 @@
 
 #ifdef HAVE_DYNLIB_SUPPORT
 
-#ifdef UNIX_COMPILE
+#if defined UNIX_COMPILE || defined __HAIKU__
 #include "dynlib-unix.c"
 #endif
 
-- 
2.19.1

