From 8cb02f7c057b303a0e0164d95f880f42bcec8731 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Tue, 21 Jan 2014 22:40:24 +0100
Subject: Remove outdated include.


diff --git a/sources/F1Shttp.cpp b/sources/F1Shttp.cpp
index 59a213c..9cb48cc 100644
--- a/sources/F1Shttp.cpp
+++ b/sources/F1Shttp.cpp
@@ -3,7 +3,6 @@
 #include "string.h"
 
 #include <curl/curl.h>
-#include <curl/types.h>
 #include <curl/easy.h>
 
 #include "F1Shttp.h"
-- 
2.21.0


From b1c60fe6ae380158e9b137c5a29415d5bf7067a3 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Fri, 13 Nov 2015 09:33:23 +0100
Subject: Fix settings directory


diff --git a/sources/filehandling.cpp b/sources/filehandling.cpp
index 899df3a..353a3b7 100644
--- a/sources/filehandling.cpp
+++ b/sources/filehandling.cpp
@@ -1,5 +1,9 @@
 #include "filehandling.h"
 
+#ifdef __HAIKU__
+#include <FindDirectory.h>
+#endif
+
 #ifndef _WIN32
 // make (sub)directories including multiple subdirs
 int mkdirp(const char *fqfn, mode_t mode)
@@ -51,7 +55,11 @@ FILE *f1open(const char *f, const char *m, const enum filetype t)
 
 		case USERDATA:
 			// userdata is put in $HOME/.GAMENAME/
-			snprintf(fname, STRLEN - 1, "%s/.%s/%s", getenv("HOME"), GAMENAME, f);
+			find_directory(B_USER_SETTINGS_DIRECTORY, 0, false, fname, STRLEN);
+			strcat(fname, "/");
+			strcat(fname, GAMENAME);
+			strcat(fname, "/");
+			strcat(fname, f);
 			// create subdirs if they don't exist
 			mkdirp(fname, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
 			// open file
diff --git a/sources/state_replaymanager.cpp b/sources/state_replaymanager.cpp
index 4aa1c99..b1a9f89 100644
--- a/sources/state_replaymanager.cpp
+++ b/sources/state_replaymanager.cpp
@@ -4,6 +4,10 @@
 #include "dirent.h"
 #endif
 
+#ifdef __HAIKU__
+#include <FindDirectory.h>
+#endif
+
 #include "stdio.h"
 #include "math.h"
 #include "stdlib.h"
@@ -94,7 +98,10 @@ int F1SpiritApp::replaymanager_cycle(KEYBOARDSTATE *k)
 
 		char dir[STRLEN];
 
-		snprintf(dir, STRLEN - 1, "%s/.%s/replays", getenv("HOME"), GAMENAME);
+		find_directory(B_USER_SETTINGS_DIRECTORY, 0, false, dir, STRLEN);
+		strcat(dir, "/");
+		strcat(dir, GAMENAME);
+		strcat(dir, "/replays");
 
 		dp = opendir(dir);
 
-- 
2.21.0


From 0bdf3b49ebb4c74d67b096aa4214da3f42067ea3 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Sun, 14 Jul 2019 08:53:32 +0200
Subject: Fix build with gcc8


diff --git a/build/linux/Makefile b/build/linux/Makefile
index f3069a3..ba9ab7d 100644
--- a/build/linux/Makefile
+++ b/build/linux/Makefile
@@ -38,7 +38,7 @@ OBJS = \
 	$(SRC)/Vector.o					$(SRC)/weather.o				\
 	$(SRC)/filehandling.o			$(SRC)/CarEngineSound.o
 
-CC = gcc
+CC = g++
 #CFLAGS = -g3 -O3 -Wall `sdl-config --cflags` `curl-config --cflags` -I/usr/X11R6/include
 CFLAGS = -g3 -O3 -Wno-write-strings `sdl-config --cflags` `curl-config --cflags` -I/usr/X11R6/include
 LDFLAGS = `sdl-config --libs` `curl-config --libs` -L/usr/X11R6/lib/ -lSDL_image -lSDL_mixer -lSDL_net -lGL -lGLU
diff --git a/sources/auxiliar.cpp b/sources/auxiliar.cpp
index d0c92e9..72c1a6f 100644
--- a/sources/auxiliar.cpp
+++ b/sources/auxiliar.cpp
@@ -11,6 +11,11 @@
 #include "math.h"
 #include "string.h"
 
+#ifdef __HAIKU__
+typedef int boolean;
+#define HAVE_BOOLEAN
+#endif
+
 #include "SDL.h"
 #include "SDL_image.h"
 
@@ -93,7 +98,7 @@ SDL_Surface *load_maskedimage(char *imagefile, char *maskfile, char *path)
 
 	if (tmp == 0 ||
 	        mask == 0)
-		return false;
+		return (boolean)false;
 
 	res = SDL_DisplayFormatAlpha(tmp);
 
-- 
2.21.0

