Skip to content

Commit

Permalink
swftools: Fix build failure on pickier compilers
Browse files Browse the repository at this point in the history
  • Loading branch information
ryandesign committed Oct 21, 2017
1 parent b54c5a0 commit be0a05d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions graphics/swftools/Portfile
Expand Up @@ -23,6 +23,7 @@ depends_lib port:jpeg port:openjpeg15 port:freetype port:lame \
patchfiles patch-Makefile.common.in.diff \
patch-configure.diff \
patch-lib-jpeg.c.diff \
patch-lib-pdf-xpdf-GlobalParams.cc.diff \
patch-setup.py.diff \
patch-src_gif2swf.c.diff

Expand Down
14 changes: 14 additions & 0 deletions graphics/swftools/files/patch-lib-pdf-xpdf-GlobalParams.cc.diff
@@ -0,0 +1,14 @@
--- lib/pdf/xpdf/GlobalParams.cc.orig 2012-04-08 12:26:34.000000000 -0500
+++ lib/pdf/xpdf/GlobalParams.cc 2017-10-21 00:03:04.000000000 -0500
@@ -922,9 +922,9 @@
char* p = pos1>pos2?pos1:pos2;
int pos = p ? p-cfgFileName : -1;
GString*path = new GString(new GString(cfgFileName), 0, (pos < 0 ? strlen(cfgFileName): pos));
- if(pos1>=0)
+ if (pos1 != NULL)
path->append('/');
- else if(pos2>=0)
+ else if (pos2 != NULL)
path->append('\\');
else
#ifdef WIN32

0 comments on commit be0a05d

Please sign in to comment.