From: Christoph Egger <christoph@debian.org>
Date: Thu, 8 Nov 2012 16:56:41 +0100
Subject: Build on kFreeBSD and Hurd

We need to make the Makefile aware of kFreeBSD and Hurd.
---
 etw/Makefile |    2 +-
 etw/etw.c    |   10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/etw/Makefile b/etw/Makefile
index 235e8cb..777a194 100644
--- a/etw/Makefile
+++ b/etw/Makefile
@@ -4,7 +4,7 @@ SYSTEM=`uname -s 2>/dev/null`
 
 all:
 	@case $(SYSTEM) in \
-	  "Linux") \
+	  "Linux"|*kFreeBSD*|*GNU*) \
 	    $(MAKE) -f Makefile.linux $@ \
 	    ;; \
 	  "Darwin") \
diff --git a/etw/etw.c b/etw/etw.c
index 0aaeb40..2e28f6c 100644
--- a/etw/etw.c
+++ b/etw/etw.c
@@ -10,7 +10,7 @@
 
 #include <sys/stat.h>
 #include <sys/types.h>
-#elif defined(LINUX) || defined(SOLARIS_X86)
+#elif defined(__GLIBC__) || defined(SOLARIS_X86)
 #include <gtk/gtk.h>
 #include <unistd.h>
 
@@ -359,7 +359,7 @@ BOOL LoadMenuStuff(void)
 int errno;
 #endif
 
-#ifdef linux
+#ifdef __GLIBC__
 #include "prefix.h"
 #endif
 
@@ -371,7 +371,7 @@ int main(int argc, char *argv[])
 
     /* LINUX programs aren't relocatable, except with this trick
      */
-#if defined(linux)
+#if defined(__GLIBC__)
     DIR *l;
 
     if ((l = opendir("newgfx"))) {
@@ -417,7 +417,7 @@ int main(int argc, char *argv[])
     
     InitStrings();
 
-#if defined(LINUX) || defined(SOLARIS_X86)
+#if defined(__GLIBC__) || defined(SOLARIS_X86)
     gtk_init(&argc, &argv);
 #endif
 
@@ -437,7 +437,7 @@ int main(int argc, char *argv[])
     HIGH_FILE = "../Documents/high";
     CONFIG_FILE = "../Documents/thismatch";
     RESULT_FILE = "../Documents/result";    
-#elif defined(LINUX) || defined(SOLARIS_X86)
+#elif defined(__GLIBC__) || defined(SOLARIS_X86)
     /* Find data and temporary directories */
     {
         struct passwd *pwd;
