summaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2019-01-02 11:25:32 +0000
committernia <nia@pkgsrc.org>2019-01-02 11:25:32 +0000
commit5bce58b4c10efd39a267a8b8cbbf1c2cf274256a (patch)
tree092660ce8cfb5efab9f3b14fb79adbc2f89e1f79 /emulators
parent94a82b8bd358e6a63c1978e547cde86c63adac62 (diff)
downloadpkgsrc-5bce58b4c10efd39a267a8b8cbbf1c2cf274256a.tar.gz
emulators/snes9x: Rename a function from log2 to log2l to avoid problems
with libc collisions on certain platforms.
Diffstat (limited to 'emulators')
-rw-r--r--emulators/snes9x/distinfo3
-rw-r--r--emulators/snes9x/patches/patch-unix_unix.cpp33
2 files changed, 35 insertions, 1 deletions
diff --git a/emulators/snes9x/distinfo b/emulators/snes9x/distinfo
index 1e5ac6bcea8..c968967feac 100644
--- a/emulators/snes9x/distinfo
+++ b/emulators/snes9x/distinfo
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.20 2019/01/01 22:16:14 nia Exp $
+$NetBSD: distinfo,v 1.21 2019/01/02 11:25:32 nia Exp $
SHA1 (snes9x-1.58.tar.gz) = c94ceb8d7b322b4bfa030b1327d815b697e4176a
RMD160 (snes9x-1.58.tar.gz) = 51f7fe17f003998b35204046ca7d193d37980da1
SHA512 (snes9x-1.58.tar.gz) = 51f8e92258db58e55f7b0b6c4537a916358891bb5ee35bd984d1970d2fedbdb2f8b3a4f560e0302d3011e521a1072c8a0d69723e8b151f61d33802c02f392d7d
Size (snes9x-1.58.tar.gz) = 2830667 bytes
SHA1 (patch-unix_configure) = 9df9a805141396583bceb35bea1bda157ed3ed6b
+SHA1 (patch-unix_unix.cpp) = 96089e2cc990a1b6bb83b94c3509957f91fd046a
diff --git a/emulators/snes9x/patches/patch-unix_unix.cpp b/emulators/snes9x/patches/patch-unix_unix.cpp
new file mode 100644
index 00000000000..20eb4aedddc
--- /dev/null
+++ b/emulators/snes9x/patches/patch-unix_unix.cpp
@@ -0,0 +1,33 @@
+$NetBSD: patch-unix_unix.cpp,v 1.1 2019/01/02 11:25:32 nia Exp $
+
+Avoid colliding with libc functions.
+
+--- unix/unix.cpp.orig 2018-12-16 17:04:59.000000000 +0000
++++ unix/unix.cpp
+@@ -156,7 +156,7 @@ bool S9xDisplayPollButton (uint32, bool
+ bool S9xDisplayPollAxis (uint32, int16 *);
+ bool S9xDisplayPollPointer (uint32, int16 *, int16 *);
+
+-static long log2 (long);
++static long log2l (long);
+ static void SoundTrigger (void);
+ static void InitTimer (void);
+ static void NSRTControllerSetup (void);
+@@ -230,7 +230,7 @@ void _makepath (char *path, const char *
+ }
+ }
+
+-static long log2 (long num)
++static long log2l (long num)
+ {
+ long n = 0;
+
+@@ -1324,7 +1324,7 @@ bool8 S9xOpenSoundDevice (void)
+ return (FALSE);
+ }
+
+- J = log2(unixSettings.SoundFragmentSize) | (3 << 16);
++ J = log2l(unixSettings.SoundFragmentSize) | (3 << 16);
+ if (ioctl(so.sound_fd, SNDCTL_DSP_SETFRAGMENT, &J) == -1)
+ return (FALSE);
+