Several FTBFS fixes for Hurd systems.
authorJordi Mallach <jordi@debian.org>
Fri, 30 Dec 2022 17:08:54 +0000 (18:08 +0100)
committerCesare Falco <c.falco@ubuntu.com>
Fri, 30 Dec 2022 17:08:54 +0000 (18:08 +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 7c6c07076d77dcdfedbccbbbd2fda6272cfe5c36..f7ba29217d822b426780cfa21b5083894ed05b37 100644 (file)
--- a/makefile
+++ b/makefile
@@ -222,6 +222,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
@@ -1315,6 +1318,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 b6b9f30366767dea1293b2208d4e6e298370d07b..aca7787a13c0db6408638be994353419fd39e869 100644 (file)
@@ -145,6 +145,7 @@ newoption {
                { "netbsd",        "NetBSD"                 },
                { "openbsd",       "OpenBSD"                },
                { "linux",         "Linux"                  },
+               { "gnu",           "GNU"                    },
                { "macosx",        "OSX"                    },
                { "windows",       "Windows"                },
                { "haiku",         "Haiku"                  },
index f8d698a0b51dec8acf1f5c45db7c70cc6ffdb69a..0114cb450d9c068ee84ebe5ed2f89f731c475969 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 c5ce8bf7b4e4581a42f82c5907ead3c042aa17e2..7bc8838b6a17f2e2151d09cf0d16ab1a31247ca9 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 57ff069a2ce1c05753aa7221377981d9dba097c9..8a64cc241c53c6d3f80865b639d6250eeb36e06a 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 fc9214fe446f03541423b803233446ba2c60391f..693b64551ed91dd27da8d30812acf9fffcc76901 100644 (file)
@@ -240,7 +240,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__)