Several FTBFS fixes for Hurd systems.
authorJordi Mallach <jordi@debian.org>
Thu, 14 Feb 2019 09:22:17 +0000 (10:22 +0100)
committerJordi Mallach <jordi@debian.org>
Thu, 14 Feb 2019 09:22:17 +0000 (10:22 +0100)
Forwarded: no

Gbp-Pq: Name hurd.patch

makefile
scripts/genie.lua
scripts/src/osd/sdl.lua
src/osd/modules/file/posixfile.cpp
src/osd/modules/file/posixptty.cpp
src/osd/modules/render/drawbgfx.cpp
src/osd/sdl/sdlprefix.h

index 6cbcf82110c2795e48cc051cd3ab5349e22e0637..43b1e5419e2db71c991401b0562f55b148293f16 100644 (file)
--- a/makefile
+++ b/makefile
@@ -208,6 +208,9 @@ ifeq ($(firstword $(filter OpenBSD,$(UNAME))),OpenBSD)
 OS := openbsd
 GENIEOS := freebsd
 endif
+ifeq ($(firstword $(filter GNU,$(UNAME))),GNU)
+OS := gnu
+endif
 ifeq ($(firstword $(filter Darwin,$(UNAME))),Darwin)
 OS := macosx
 GENIEOS := darwin
@@ -1280,6 +1283,16 @@ linux: generate $(PROJECTDIR)/$(MAKETYPE)-linux/Makefile
        $(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/$(MAKETYPE)-linux config=$(CONFIG) precompile
        $(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/$(MAKETYPE)-linux config=$(CONFIG)
 
+.PHONY: gnu_x86
+gnu_x86: generate $(PROJECTDIR)/$(MAKETYPE)-linux/Makefile
+       $(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/$(MAKETYPE)-linux config=$(CONFIG)32 precompile
+       $(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/$(MAKETYPE)-linux config=$(CONFIG)32
+
+.PHONY: gnu
+gnu: generate $(PROJECTDIR)/$(MAKETYPE)-linux/Makefile
+       $(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/$(MAKETYPE)-linux config=$(CONFIG) precompile
+       $(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/$(MAKETYPE)-linux config=$(CONFIG)
+
 #-------------------------------------------------
 # gmake-linux-clang
 #-------------------------------------------------
index 2696ad6db96dcdacd02c03e68e2ea2c1925d1be1..d9f09eb510ce7ae75bf4126e6aa206e933ddf46a 100644 (file)
@@ -129,6 +129,7 @@ newoption {
                { "freebsd",       "FreeBSD"                },
                { "netbsd",        "NetBSD"                 },
                { "openbsd",       "OpenBSD"                },
+               { "gnu",           "GNU"                    },
                { "pnacl",         "Native Client - PNaCl"  },
                { "linux",         "Linux"                  },
                { "ios",           "iOS"                    },
index 9ef57e0ba7c8a83fea1eb322dc2304974f892fca..dd012842f7f1017b87c82ae88af54909ed0a9ebf 100644 (file)
@@ -222,6 +222,9 @@ if _OPTIONS["targetos"]=="linux" then
 elseif _OPTIONS["targetos"]=="openbsd" then
 elseif _OPTIONS["targetos"]=="netbsd" then
        SDL_NETWORK         = "pcap"
+elseif _OPTIONS["targetos"]=="gnu" then
+       SDL_NETWORK         = "taptun"
+       SYNC_IMPLEMENTATION = "tc"
 elseif _OPTIONS["targetos"]=="haiku" then
 elseif _OPTIONS["targetos"]=="asmjs" then
 elseif _OPTIONS["targetos"]=="windows" then
index 832b6810db4033c25e9a5ff2845b67310a143ded..d23a69d3930dcf40aee894ee96ed909a2304678f 100644 (file)
 #endif
 #endif
 
+#if defined(__GNU__)
+#ifndef PATH_MAX
+#define PATH_MAX 1024
+#endif
+#endif
+
 // MAME headers
 #include "posixfile.h"
 #include "unicode.h"
index 4a4bc9d8db96c4fdbf4287881d3000ce77825740..25ce763692aae0a7ec3933cfbeb12c87d2474ed3 100644 (file)
 #include <util.h>
 #elif defined(__linux__) || defined(EMSCRIPTEN)
 #include <pty.h>
+#elif defined(__GNU__)
+#include <pty.h>
+#include <termios.h>
 #elif defined(__HAIKU__)
 #include <bsd/pty.h>
 #endif
 
+#if defined(__GNU__)
+#ifndef PATH_MAX
+#define PATH_MAX 1024
+#endif
+#endif
 
 namespace {
 #if defined(__APPLE__)
index 0c483d9eb599286512e6aa390150cb853b3cdb65..fdf9c34a9672c28d30ca2d0f5e2fcf94931336d1 100644 (file)
@@ -153,7 +153,7 @@ static void* sdlNativeWindowHandle(SDL_Window* _window)
                return nullptr;
        }
 
-#   if BX_PLATFORM_LINUX || BX_PLATFORM_BSD || BX_PLATFORM_RPI
+#   if BX_PLATFORM_LINUX || BX_PLATFORM_BSD || BX_PLATFORM_HURD || BX_PLATFORM_RPI
        return (void*)wmi.info.x11.window;
 #   elif BX_PLATFORM_OSX
        return wmi.info.cocoa.window;
index 79f6c81f4ddf603e33497731cfd21efab7ecfce3..10654c4a6a574bb8882d938154a8f5373e9cd480 100644 (file)
@@ -40,7 +40,7 @@
 /* Large file support on IRIX needs _SGI_SOURCE */
 #undef _POSIX_SOURCE
 
-#elif defined(__linux__) || defined(__FreeBSD_kernel__)
+#elif defined(__linux__) || defined(__GNU__) || defined(__FreeBSD_kernel__)
 #define SDLMAME_LINUX 1
 
 #elif defined(__FreeBSD__)