[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Patch for GNU/Hurd



severity 720941 normal
thanks

Hello,

This bug was given the patch flag, but no patch was supplied. Attached
is a patch to make zsnes build on GNU/Hurd.

However, starting the program results in the problems below, followed by
a freeze of the game window, needing further investigation to be usable:

#> src/zsnes -dd -d
ZSNES v1.51, (c) 1997-2007, ZSNES Team
Be sure to check http://www.zsnes.com/ for the latest version.

ZSNES is written by the ZSNES Team (See AUTHORS.TXT)
ZSNES comes with ABSOLUTELY NO WARRANTY.  This is free software,
and you are welcome to redistribute it under certain conditions;
please read 'LICENSE.TXT' thoroughly before doing so.

Use ZSNES -? for command line definitions.

ManyMouse: -1 mice detected.
Failed to truncate cookie file: Invalid argument
Failed to truncate cookie file: Invalid argument
Failed to write cookie file: Unknown error (os/kern) 303
socket(): Protocol wrong type for socket
socket(): Protocol wrong type for socket
W: [(null)] caps.c: Normally all extra capabilities would be dropped
now, but that's impossible because this Pulseaudio was built without
libcap support.
pulseaudio: ../libpthread/sysdeps/mach/pt-thread-halt.c:51:
__pthread_thread_halt: Unexpected error: (ipc/send) invalid destination
port.
ZSNES could not find any joysticks.

--- a/src/configure.in	2013-08-26 17:31:43.000000000 +0200
+++ b/src/configure.in	2013-08-26 19:40:04.000000000 +0200
@@ -83,6 +83,9 @@ case x$target in
   *-*-cygwin* | *-*-*ming*)
     NFLAGS="$NFLAGS -f win32"
     ;;
+  *-*-gnu*)
+    NFLAGS="$NFLAGS -f elf -DELF"
+    ;;
   *)
     AC_MSG_ERROR(This target is not supported)
     ;;
@@ -290,7 +293,14 @@ else
     if test x$force_arch = x; then
       AC_MSG_WARN([If you intend to distribute this binary, make sure you use force_arch and set to i586 (or whichever CPU Arch you intend for)])
     fi
-    CFLAGS="$CFLAGS -O3 -fomit-frame-pointer -fprefetch-loop-arrays -fforce-addr -D__RELEASE__"
+    case x$target in
+      *-*-gnu*)
+        CFLAGS="$CFLAGS -O3 -fomit-frame-pointer -fforce-addr -D__RELEASE__"
+        ;;
+      *)
+        CFLAGS="$CFLAGS -O3 -fomit-frame-pointer -fprefetch-loop-arrays -fforce-addr -D__RELEASE__"
+        ;;
+    esac
     NFLAGS="$NFLAGS -O99999999 -D__RELEASE__"
   else
     CFLAGS="$CFLAGS -O3 -fomit-frame-pointer"
--- a/src/gblhdr.h	2006-12-27 11:47:05.000000000 +0100
+++ b/src/gblhdr.h	2013-08-26 18:16:20.000000000 +0200
@@ -121,10 +121,14 @@ however it's a static value that we can
 #ifdef __UNIXSDL__
 #ifdef linux
 #include <asm/ioctls.h>
+#ese
+#ifdef __GNU__
+#include <hurd/ioctls.h>
 #else
 #include <sys/filio.h>
 #endif
 #endif
+#endif
 
 
 #endif

Reply to: