fix build with clang6; from FreeBSD; ok schwarze@

This commit is contained in:
naddy 2018-04-16 14:10:02 +00:00
parent e3fbfac231
commit 8407666f42
3 changed files with 30 additions and 1 deletions

View File

@ -1,9 +1,10 @@
# $OpenBSD: Makefile,v 1.33 2018/03/13 21:13:48 jasper Exp $
# $OpenBSD: Makefile,v 1.34 2018/04/16 14:10:02 naddy Exp $
COMMENT= Oxyd/Rock'n'Roll clone
V= 1.21
DISTNAME= enigma-${V}
REVISION= 0
CATEGORIES= games x11

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-src_Value_cc,v 1.1 2018/04/16 14:10:02 naddy Exp $
Index: src/Value.cc
--- src/Value.cc.orig
+++ src/Value.cc
@@ -149,7 +149,7 @@ namespace enigma {
val.dval[0] = false;
break;
case OBJECT :
- val.dval[0] = (double) NULL;
+ val.dval[0] = 0;
break;
case NAMEDOBJECT:
ASSERT(false, XLevelRuntime, "Value: illegal type usage");

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-src_lev_Proxy_cc,v 1.1 2018/04/16 14:10:02 naddy Exp $
Index: src/lev/Proxy.cc
--- src/lev/Proxy.cc.orig
+++ src/lev/Proxy.cc
@@ -933,7 +933,7 @@ namespace enigma { namespace lev {
} else if (haveLocalCopy) {
// plain file
basic_ifstream<char> ifs(absExtPath.c_str(), ios::binary | ios::in);
- if (ifs != NULL)
+ if (ifs)
Readfile(ifs, extCode);
else
haveLocalCopy = false;