1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-25 04:43:33 +00:00

Unbreak emulators/visualboyadvance-m

fex/fex/File_Extractor.h:181:58: error: cannot initialize return object of type 'blargg_err_t' (aka 'const char *') with an lvalue of type 'const int'
inline blargg_err_t File_Extractor::rewind_v()  { return blargg_ok; }

PR:		223538
Submitted by:	w.schwarzenfeld@utanet.at (based on)
This commit is contained in:
Tobias Kortkamp 2019-02-11 08:59:01 +00:00
parent c5f938513b
commit bddf06f405
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=492675
3 changed files with 33 additions and 2 deletions

View File

@ -13,7 +13,6 @@ LICENSE= GPLv2
LIB_DEPENDS= libpng.so:graphics/png
BROKEN= fails to build
BROKEN_aarch64= fails to build: regparm is not valid on this platform
BROKEN_armv6= fails to build: regparm is not valid on this platform
BROKEN_armv7= fails to build: regparm is not valid on this platform
@ -41,7 +40,7 @@ DOS2UNIX_REGEX= .*\.(c|cpp|h|ypp)
USE_XORG= x11 xext
USE_GL= gl glu
USE_SDL= sdl
USES= cmake:insource dos2unix pkgconfig
USES= compiler:c++11-lang cmake:insource dos2unix gnome gl pkgconfig
INSTALLS_ICONS= yes
CMAKE_ARGS= -DVERSION:STRING="${PORTVERSION}" \
-DSYSCONFDIR:STRING="${PREFIX}/etc" \

View File

@ -0,0 +1,11 @@
--- fex/fex/blargg_common.h.orig 2019-02-11 08:38:11 UTC
+++ fex/fex/blargg_common.h
@@ -12,7 +12,7 @@
typedef const char* blargg_err_t; // 0 on success, otherwise error string
// Success; no error
-int const blargg_ok = 0;
+const char* const blargg_ok = 0;
// BLARGG_RESTRICT: equivalent to C99's restrict, where supported
#if __GNUC__ >= 3 || _MSC_VER >= 1100

View File

@ -0,0 +1,21 @@
--- src/gba/Cheats.cpp.orig 2019-02-11 08:37:58 UTC
+++ src/gba/Cheats.cpp
@@ -2477,12 +2477,12 @@ void cheatsAddCBACode(const char *code, const char *de
sscanf(buffer, "%x", &value);
u8 array[8] = {
- address & 255,
- (address >> 8) & 255,
- (address >> 16) & 255,
- (address >> 24) & 255,
- (value & 255),
- (value >> 8) & 255,
+ static_cast<u8>(address & 255),
+ static_cast<u8>((address >> 8) & 255),
+ static_cast<u8>((address >> 16) & 255),
+ static_cast<u8>((address >> 24) & 255),
+ static_cast<u8>((value & 255)),
+ static_cast<u8>((value >> 8) & 255),
0,
0
};