From e79ecd9ea29e236288e30bf1a61fbc3404fb1edf Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Thu, 17 Jul 2014 15:46:58 +0200
Subject: Remove -lm -lpthread.


diff --git a/Makefile b/Makefile
index 3b87807..e9270a2 100644
--- a/Makefile
+++ b/Makefile
@@ -19,7 +19,7 @@ DEFS = $(PUF) -DDATADIR="\"$(DATADIR)\""
 INCS =  -I. -I/usr/include -I/usr/include/SDL
 
 LDFLAGS=$(CFLAGS)
-LIBS = -lSDL -lSDL_image -lSDL_mixer -lpng -lm -lz -lpthread
+LIBS = -lSDL -lSDL_image -lSDL_mixer -lpng -lz
 
 #Are we compiling with gl?
 ifneq ($(WITH_OPENGL),false)
-- 
1.8.3.4


From 29e6ef655836fba865d2d9743400db28f8245655 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Thu, 17 Jul 2014 15:53:14 +0200
Subject: Fix home dir search path.


diff --git a/userfiles.c b/userfiles.c
index fae8eae..0e5538b 100644
--- a/userfiles.c
+++ b/userfiles.c
@@ -23,6 +23,10 @@
 #include <string.h>
 #include <stdlib.h>
 
+#ifdef __HAIKU__
+#include <FindDirectory.h>
+#endif
+
 static char* strConfDir;
 static char* strEditLvlDir;
 static char* strHsDir;
@@ -32,6 +36,11 @@ void initUserPaths()
   #ifdef PER_USER_FILES
 
     //Generate directory string
+#ifdef __HAIKU__
+	strConfDir = malloc(PATH_MAX);
+	if (find_path(initUserPaths, B_FIND_PATH_SETTINGS_DIRECTORY, "wizznic",
+		strConfDir, PATH_MAX) != B_OK)
+#endif
     if(getenv("XDG_CONFIG_HOME") != NULL)
     {
       strConfDir = malloc( sizeof(char)*(strlen(getenv("XDG_CONFIG_HOME"))+strlen("/wizznic"))+1 );
-- 
1.8.3.4

