Several FTBFS fixes for Hurd systems.
authorJordi Mallach <jordi@debian.org>
Wed, 27 Jan 2021 18:26:13 +0000 (19:26 +0100)
committerCesare Falco <c.falco@ubuntu.com>
Wed, 27 Jan 2021 18:26:13 +0000 (19:26 +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 6ca6f5ac898cd725594b3b3ec2cf4d78473bdd3a..a0f5b96d3857bea201a44bee98ed65c75d874073 100644 (file)
--- a/makefile
+++ b/makefile
@@ -219,6 +219,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
@@ -1408,6 +1411,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 af8007f38ed553c65ae3e7cf8ca21ce55eb665b3..f5b8171b00378911de1357a9b6e21ad32740d7ea 100644 (file)
@@ -136,6 +136,7 @@ newoption {
                { "freebsd",       "FreeBSD"                },
                { "netbsd",        "NetBSD"                 },
                { "openbsd",       "OpenBSD"                },
+               { "gnu",           "GNU"                    },
                { "pnacl",         "Native Client - PNaCl"  },
                { "linux",         "Linux"                  },
                { "ios",           "iOS"                    },
index 37dfb221067756d2fea6749696fa4a95e560d80e..825bc945ebe86c864b1203c1cac309802102da94 100644 (file)
@@ -242,6 +242,9 @@ SDLOS_TARGETOS      = "unix"
 if _OPTIONS["targetos"]=="linux" then
 elseif _OPTIONS["targetos"]=="openbsd" then
 elseif _OPTIONS["targetos"]=="netbsd" then
+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 ffdd4c4d47716b4c55b6a0d5aa97080f85e1cdc5..4d1f9428149fd40c00d5d5560f3364683c02d70c 100644 (file)
 #define _DARWIN_C_SOURCE
 #endif
 
+#if defined(__GNU__)
+#ifndef PATH_MAX
+#define PATH_MAX 1024
+#endif
+#endif
+
 // MAME headers
 #include "posixfile.h"
 #include "osdcore.h"
index 5ecb37057ad8609e5be5d20f941ec9a21654232e..eb1e5f6e0c304dc44ff01c195039f0cb1fae73fc 100644 (file)
@@ -27,6 +27,9 @@
 #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>
 #elif defined(__sun)
 #include <sys/conf.h>
 #endif
 
+#if defined(__GNU__)
+#ifndef PATH_MAX
+#define PATH_MAX 1024
+#endif
+#endif
 
 namespace {
 #if defined(__APPLE__)
index 7f0cd3d59367bcb961f75d5dba7521205a001ac7..c3044f9b7d79c001dcb7615af8963c4301b8c88d 100644 (file)
@@ -168,7 +168,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 0678b3ddba5c11db1b30e874acd7e0af8e027717..5303c867b799f2a6c5589d1733bac3f8417bd87c 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__)