From: Jordi Mallach Date: Wed, 27 Jan 2021 18:26:13 +0000 (+0100) Subject: Several FTBFS fixes for Hurd systems. X-Git-Tag: archive/raspbian/0.266+dfsg.1-1+rpi1~1^2^2^2~5 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=4ab190a7101a7fb8980dec34030468c9e2a0d84d;p=mame.git Several FTBFS fixes for Hurd systems. Forwarded: no Gbp-Pq: Name hurd.patch --- diff --git a/makefile b/makefile index 6ca6f5ac8..a0f5b96d3 100644 --- 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 #------------------------------------------------- diff --git a/scripts/genie.lua b/scripts/genie.lua index af8007f38..f5b8171b0 100644 --- a/scripts/genie.lua +++ b/scripts/genie.lua @@ -136,6 +136,7 @@ newoption { { "freebsd", "FreeBSD" }, { "netbsd", "NetBSD" }, { "openbsd", "OpenBSD" }, + { "gnu", "GNU" }, { "pnacl", "Native Client - PNaCl" }, { "linux", "Linux" }, { "ios", "iOS" }, diff --git a/scripts/src/osd/sdl.lua b/scripts/src/osd/sdl.lua index 37dfb2210..825bc945e 100644 --- a/scripts/src/osd/sdl.lua +++ b/scripts/src/osd/sdl.lua @@ -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 diff --git a/src/osd/modules/file/posixfile.cpp b/src/osd/modules/file/posixfile.cpp index ffdd4c4d4..4d1f94281 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 5ecb37057..eb1e5f6e0 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/modules/render/drawbgfx.cpp b/src/osd/modules/render/drawbgfx.cpp index 7f0cd3d59..c3044f9b7 100644 --- a/src/osd/modules/render/drawbgfx.cpp +++ b/src/osd/modules/render/drawbgfx.cpp @@ -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; 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__)