xnp2: fix the build with ports-gcc
OK bentley@
This commit is contained in:
parent
9b2bce81b4
commit
c208a0b405
@ -1,10 +1,10 @@
|
||||
# $OpenBSD: Makefile,v 1.14 2019/07/12 20:46:10 sthen Exp $
|
||||
# $OpenBSD: Makefile,v 1.15 2019/08/12 17:47:52 cwen Exp $
|
||||
|
||||
COMMENT = PC-9801 emulator
|
||||
|
||||
DISTNAME = xnp2-0.86
|
||||
EPOCH = 0
|
||||
REVISION = 3
|
||||
REVISION = 4
|
||||
CATEGORIES = emulators
|
||||
|
||||
HOMEPAGE = https://www.nonakap.org/np2/
|
||||
|
25
emulators/xnp2/patches/patch-x11_compiler_h
Normal file
25
emulators/xnp2/patches/patch-x11_compiler_h
Normal file
@ -0,0 +1,25 @@
|
||||
$OpenBSD: patch-x11_compiler_h,v 1.1 2019/08/12 17:47:52 cwen Exp $
|
||||
|
||||
ports-gcc fix for:
|
||||
error: macro "min" passed 3 arguments, but takes just 2
|
||||
From:
|
||||
https://github.com/nonakap/xnp2/issues/6
|
||||
|
||||
Index: x11/compiler.h
|
||||
--- x11/compiler.h.orig
|
||||
+++ x11/compiler.h
|
||||
@@ -117,12 +117,14 @@ typedef gboolean BOOL;
|
||||
#define MAX_PATH MAXPATHLEN
|
||||
#endif
|
||||
|
||||
+#ifndef __cplusplus
|
||||
#ifndef max
|
||||
#define max(a,b) (((a) > (b)) ? (a) : (b))
|
||||
#endif
|
||||
#ifndef min
|
||||
#define min(a,b) (((a) < (b)) ? (a) : (b))
|
||||
#endif
|
||||
+#endif /* __cplusplus */
|
||||
|
||||
#ifndef ZeroMemory
|
||||
#define ZeroMemory(d,n) memset((d), 0, (n))
|
Loading…
Reference in New Issue
Block a user