﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,resolution,keywords,cc,phab_field
1322,[PATCH] FTBFS on Debian GNU/kfreebsd,Vincent Cheng,,"On Debian GNU/kfreebsd, 0 A.D. fails to build from source while building premake (Debian buildd logs can be found at `[1]`), because premake doesn't recognize Debian GNU/kFreeBSD as a valid BSD platform `[2]`, and thinks we're running a build in a Windows environment instead. The following patch fixes this:

{{{
--- a/build/premake/premake4/src/host/premake.h
+++ b/build/premake/premake4/src/host/premake.h
@@ -15,7 +15,7 @@
 #if defined(__linux__)
 #define PLATFORM_LINUX    (1)
 #define PLATFORM_STRING   ""linux""
-#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD_kernel__)
 #define PLATFORM_BSD      (1)
 #define PLATFORM_STRING   ""bsd""
 #elif defined(__APPLE__) && defined(__MACH__)
}}}
----
 * `[1]` https://buildd.debian.org/status/package.php?p=0ad
 * `[2]` http://wiki.debian.org/Debian_GNU/kFreeBSD_FAQ#Q._How_do_I_detect_kfreebsd_with_preprocessor_directives_in_a_C_program.3F",defect,new,Should Have,Alpha 10,Build & Packages,,review,,
