From: Jordi Mallach Date: Fri, 31 Jan 2025 11:40:38 +0000 (+0100) Subject: Several FTBFS fixes for Hurd systems. X-Git-Tag: archive/raspbian/0.275+dfsg.1-3+rpi1^2^2^2~5 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=63a2f508f795e70afbc4f9ddf953338ef8bc9bb5;p=mame.git Several FTBFS fixes for Hurd systems. Forwarded: no Gbp-Pq: Name hurd.patch --- diff --git a/makefile b/makefile index 90fd49762..ad0156425 100644 --- 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 #------------------------------------------------- diff --git a/scripts/genie.lua b/scripts/genie.lua index 89b60a636..8ef1615f2 100644 --- a/scripts/genie.lua +++ b/scripts/genie.lua @@ -150,6 +150,7 @@ newoption { { "netbsd", "NetBSD" }, { "openbsd", "OpenBSD" }, { "linux", "Linux" }, + { "gnu", "GNU" }, { "macosx", "OSX" }, { "windows", "Windows" }, { "haiku", "Haiku" }, diff --git a/scripts/src/osd/sdl.lua b/scripts/src/osd/sdl.lua index 3115c4d64..7ea64e949 100644 --- a/scripts/src/osd/sdl.lua +++ b/scripts/src/osd/sdl.lua @@ -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 diff --git a/src/osd/modules/file/posixfile.cpp b/src/osd/modules/file/posixfile.cpp index c5ce8bf7b..7bc8838b6 100644 --- a/src/osd/modules/file/posixfile.cpp +++ b/src/osd/modules/file/posixfile.cpp @@ -42,6 +42,12 @@ #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" diff --git a/src/osd/modules/file/posixptty.cpp b/src/osd/modules/file/posixptty.cpp index 57ff069a2..8a64cc241 100644 --- a/src/osd/modules/file/posixptty.cpp +++ b/src/osd/modules/file/posixptty.cpp @@ -27,6 +27,9 @@ #include #elif defined(__linux__) || defined(__EMSCRIPTEN__) #include +#elif defined(__GNU__) +#include +#include #elif defined(__HAIKU__) #include #elif defined(__sun) @@ -35,6 +38,11 @@ #include #endif +#if defined(__GNU__) +#ifndef PATH_MAX +#define PATH_MAX 1024 +#endif +#endif namespace { #if defined(__APPLE__) diff --git a/src/osd/sdl/sdlprefix.h b/src/osd/sdl/sdlprefix.h index 0678b3ddb..5303c867b 100644 --- a/src/osd/sdl/sdlprefix.h +++ b/src/osd/sdl/sdlprefix.h @@ -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__)