Several FTBFS fixes for Hurd systems.
authorJordi Mallach <jordi@debian.org>
Mon, 10 Feb 2025 09:04:04 +0000 (10:04 +0100)
committerJordi Mallach <jordi@debian.org>
Mon, 10 Feb 2025 09:04:04 +0000 (10:04 +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/sdl/sdlprefix.h

index 90fd49762480c7cccf59001edd59e4e7613efe0f..ad01564252ee28a5b7f0c99d5643f233813d8845 100644 (file)
--- a/makefile
+++ b/makefile
@@ -223,6 +223,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
@@ -1313,6 +1316,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 89b60a6366e85f5707ae2e36bde91082238a28aa..8ef1615f24b3f8ca550f2016e42f3334719e444e 100644 (file)
@@ -150,6 +150,7 @@ newoption {
                { "netbsd",        "NetBSD"                 },
                { "openbsd",       "OpenBSD"                },
                { "linux",         "Linux"                  },
+               { "gnu",           "GNU"                    },
                { "macosx",        "OSX"                    },
                { "windows",       "Windows"                },
                { "haiku",         "Haiku"                  },
index 3115c4d644fbba8e5ed1fa9d0ca3702e51ec25fc..7ea64e9492bd31bb5a788abafbda75646ab04298 100644 (file)
@@ -217,6 +217,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 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__)