Several FTBFS fixes for Hurd systems.
authorJordi Mallach <jordi@debian.org>
Sun, 6 Apr 2025 14:23:13 +0000 (16:23 +0200)
committerJordi Mallach <jordi@debian.org>
Sun, 6 Apr 2025 14:23:13 +0000 (16:23 +0200)
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 8fc7a231c942dba3c282fd71bcbf9b413e2f4159..6f625d617d2ddaeec64c8289ab395a517f3a1ce0 100644 (file)
--- a/makefile
+++ b/makefile
@@ -229,6 +229,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
@@ -1326,6 +1329,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 a8d61a01193a2604c56fbe00ecb82092026171f6..7b5708c43992f3383ef5cfc3245d92c8f1a3ac36 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 8aebde2adc2d30917470a1c20535baf3b4b4a56b..f01f0f7837b71f7f6def064a5879a4179ee37942 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__)