- Fix build with clang 6

- Add missing dependency
This commit is contained in:
Dmitry Marakasov 2018-06-22 20:32:35 +00:00
parent 80a523280c
commit e52b21d28d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=473067
2 changed files with 16 additions and 2 deletions

View file

@ -16,9 +16,10 @@ BROKEN_armv7= fails to compile: res/3dsloader.cpp:77:15: comparison between poi
LIB_DEPENDS= libpng.so:graphics/png \
libguichan.so:devel/guichan
USES= tar:bzip2 gmake pkgconfig python:2.7
USES= dos2unix tar:bzip2 gmake pkgconfig python:2.7
DOS2UNIX_FILES= src/res/3dsloader.cpp
GNU_CONFIGURE= yes
USE_GL= gl
USE_GL= gl glu
USE_SDL= sdl mixer image
WRKSRC= ${WRKDIR}/gamediameter
@ -26,6 +27,8 @@ WRKSRC= ${WRKDIR}/gamediameter
CPPFLAGS+= `${SDL_CONFIG} --cflags` -I${LOCALBASE}/include
LDFLAGS+= `${SDL_CONFIG} --libs` -L${LOCALBASE}/lib
CXXFLAGS+= -Wno-static-float-init
DATADIR= ${PREFIX}/share/gamediameter
PLIST_FILES= bin/${PORTNAME}

View file

@ -0,0 +1,11 @@
--- src/res/3dsloader.cpp.orig 2008-07-31 11:22:38 UTC
+++ src/res/3dsloader.cpp
@@ -74,7 +74,7 @@ for (i=0; i<MAX_POLYGONS; i++)
struct stat file_status;
#endif
-if (p_filename=='\0')
+if (p_filename==nullptr || *p_filename=='\0')
return(0);
if ((l_file=fopen (p_filename, "rb"))== NULL)