summaryrefslogtreecommitdiff
path: root/emulators/sdlmame
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2009-09-01 15:20:19 +0000
committerwiz <wiz@pkgsrc.org>2009-09-01 15:20:19 +0000
commit914315faeab9872cbecdbe19fc241ae390808517 (patch)
treeb78bfd50f0e294535de0daa884128f69a49d9097 /emulators/sdlmame
parentde5e3c625cd1e67f3b21f51bbeea4dca09f405e9 (diff)
downloadpkgsrc-914315faeab9872cbecdbe19fc241ae390808517.tar.gz
NetBSD-current provides popcount, avoid conflict.
Diffstat (limited to 'emulators/sdlmame')
-rw-r--r--emulators/sdlmame/patches/patch-ac23
1 files changed, 23 insertions, 0 deletions
diff --git a/emulators/sdlmame/patches/patch-ac b/emulators/sdlmame/patches/patch-ac
new file mode 100644
index 00000000000..03b2c7a5555
--- /dev/null
+++ b/emulators/sdlmame/patches/patch-ac
@@ -0,0 +1,23 @@
+$NetBSD: patch-ac,v 1.1 2009/09/01 15:20:19 wiz Exp $
+
+--- src/emu/mamecore.h.orig 2009-09-01 14:40:54.000000000 +0000
++++ src/emu/mamecore.h
+@@ -333,6 +333,10 @@ DECL_NORETURN void CLIB_DECL fatalerror_
+ INLINE FUNCTIONS
+ ***************************************************************************/
+
++#if defined(__NetBSD__)
++#include <sys/param.h>
++#endif
++#if !defined(__NetBSD__) || (__NetBSD_Version__ < 599001500)
+ /* population count */
+ INLINE int popcount(UINT32 val)
+ {
+@@ -342,6 +346,7 @@ INLINE int popcount(UINT32 val)
+ val &= val - 1;
+ return count;
+ }
++#endif
+
+
+ /* convert a series of 32 bits into a float */