From 43aa0668062fd66325c5733bc3949926a1c7a248 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Sat, 15 Jun 2019 12:25:55 +0200
Subject: Don't pass -rdynamic on Haiku


diff --git a/configure.ac b/configure.ac
index 7f20cd4..b34b9c8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -142,7 +142,7 @@ AS_CASE([$target],
 		],
 	[
 		AS_VAR_APPEND([FD_CPPFLAGS], [" -DFD_DATADIR='\"\$(pkgdatadir)\"'"])
-		AS_VAR_APPEND([FD_LDFLAGS], [" -rdynamic -Wl,--as-needed"])
+		AS_VAR_APPEND([FD_LDFLAGS], [" -Wl,--as-needed"])
 		default_open_cmd="xdg-open"
 	]
 )
-- 
2.21.0


From d47310759403a89a91dd5c3d0c6d4bc99e117130 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Wed, 20 May 2020 15:58:43 +1000
Subject: Fix settings dir


diff --git a/src/init.c b/src/init.c
index 315e107..c85f054 100644
--- a/src/init.c
+++ b/src/init.c
@@ -836,6 +836,13 @@ void prepare_execution(int argc, char *argv[])
 		sprintf(data_dirs[CONFIG_DIR].path, "./FreedroidRPG");
 	}
 
+#elif defined(__HAIKU__)
+
+	char *our_homedir = NULL;
+	if ((our_homedir = getenv("HOME")) == NULL)
+		our_homedir = ".";
+	snprintf(data_dirs[CONFIG_DIR].path, sizeof(data_dirs[CONFIG_DIR].path), "%s/config/settings/FreedroidRPG", our_homedir);
+
 #else
 
 	char *our_homedir = NULL;
-- 
2.26.0

