From 9e3c2856953b79d7159d8b1062e48bf2e1761426 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Sat, 6 May 2017 11:09:02 +0200
Subject: Add Haiku to the known platforms


diff --git a/src/common/config.h b/src/common/config.h
index 8bb43ba..72918b6 100644
--- a/src/common/config.h
+++ b/src/common/config.h
@@ -48,7 +48,7 @@
 #		define LOVE_MACOSX 1
 #	endif
 #endif
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__HAIKU__)
 // I know it's not linux, but it seems most "linux-only" code is bsd-compatible
 #	define LOVE_LINUX 1
 #endif
-- 
2.12.2


From 7184051b36f1df6c2551e78215343e0c7e4725b2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Sat, 6 May 2017 11:18:30 +0200
Subject: Build fix for Haiku


diff --git a/src/modules/system/System.cpp b/src/modules/system/System.cpp
index 5ad3911..0f018c9 100755
--- a/src/modules/system/System.cpp
+++ b/src/modules/system/System.cpp
@@ -39,8 +39,10 @@
 #if defined(LOVE_ANDROID)
 #include "common/android.h"
 #elif defined(LOVE_LINUX)
+#ifndef __HAIKU__
 #include <spawn.h>
 #endif
+#endif
 
 #if defined(LOVE_LINUX)
 static void sigchld_handler(int sig)
@@ -132,8 +134,10 @@ bool System::openURL(const std::string &url) const
 
 	// Note: at the moment this process inherits our file descriptors.
 	// Note: the below const_cast is really ugly as well.
+	#ifndef __HAIKU__
 	if (posix_spawnp(&pid, "xdg-open", nullptr, nullptr, const_cast<char **>(argv), environ) != 0)
 		return false;
+	#endif
 
 	// Check if xdg-open already completed (or failed.)
 	int status = 0;
-- 
2.12.2

