From: Jordi Mallach Date: Thu, 14 Feb 2019 09:22:17 +0000 (+0100) Subject: Several FTBFS fixes for Hurd systems. X-Git-Tag: archive/raspbian/0.266+dfsg.1-1+rpi1~1^2^2^2^2~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b021d447680c855690e13afd8290f550550d0d22;p=mame.git Several FTBFS fixes for Hurd systems. Forwarded: no Gbp-Pq: Name hurd.patch --- diff --git a/makefile b/makefile index 6cbcf8211..43b1e5419 100644 --- a/makefile +++ b/makefile @@ -208,6 +208,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 @@ -1280,6 +1283,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 2696ad6db..d9f09eb51 100644 --- a/scripts/genie.lua +++ b/scripts/genie.lua @@ -129,6 +129,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 9ef57e0ba..dd012842f 100644 --- a/scripts/src/osd/sdl.lua +++ b/scripts/src/osd/sdl.lua @@ -222,6 +222,9 @@ if _OPTIONS["targetos"]=="linux" then elseif _OPTIONS["targetos"]=="openbsd" then elseif _OPTIONS["targetos"]=="netbsd" then SDL_NETWORK = "pcap" +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 832b6810d..d23a69d39 100644 --- a/src/osd/modules/file/posixfile.cpp +++ b/src/osd/modules/file/posixfile.cpp @@ -37,6 +37,12 @@ #endif #endif +#if defined(__GNU__) +#ifndef PATH_MAX +#define PATH_MAX 1024 +#endif +#endif + // MAME headers #include "posixfile.h" #include "unicode.h" diff --git a/src/osd/modules/file/posixptty.cpp b/src/osd/modules/file/posixptty.cpp index 4a4bc9d8d..25ce76369 100644 --- a/src/osd/modules/file/posixptty.cpp +++ b/src/osd/modules/file/posixptty.cpp @@ -27,10 +27,18 @@ #include #elif defined(__linux__) || defined(EMSCRIPTEN) #include +#elif defined(__GNU__) +#include +#include #elif defined(__HAIKU__) #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 0c483d9eb..fdf9c34a9 100644 --- a/src/osd/modules/render/drawbgfx.cpp +++ b/src/osd/modules/render/drawbgfx.cpp @@ -153,7 +153,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 79f6c81f4..10654c4a6 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__)