diff --git a/devel/ptlib/Makefile b/devel/ptlib/Makefile index fa61300f1a3..0c255da626b 100644 --- a/devel/ptlib/Makefile +++ b/devel/ptlib/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.3 2010/03/27 14:32:23 ajacoutot Exp $ +# $OpenBSD: Makefile,v 1.4 2010/05/11 07:23:23 espie Exp $ SHARED_ONLY= Yes @@ -33,6 +33,11 @@ BUILD_DEPENDS= ::devel/bison \ LIB_DEPENDS= lber,ldap,ldap_r::databases/openldap \ SDL::devel/sdl +.include +.if !${COMPILER_VERSION:L:Mgcc4} +PATCH_LIST = patch-* gcc3-patch-* +.endif + CONFIGURE_STYLE=gnu CONFIGURE_ARGS= ${CONFIGURE_SHARED} \ --with-plugin-installdir=ptlib \ diff --git a/devel/ptlib/files/sound_sndio.cxx b/devel/ptlib/files/sound_sndio.cxx index 851f18d6ebb..a581033e931 100644 --- a/devel/ptlib/files/sound_sndio.cxx +++ b/devel/ptlib/files/sound_sndio.cxx @@ -25,6 +25,11 @@ * All Rights Reserved. * * $Log: sound_sndio.cxx,v $ + * Revision 1.2 2010/05/11 07:23:23 espie + * make it compile on gcc4, by making the relevant patch dependent on + * compiler version. + * also removes lvalue cast, that's not ansi. + * * Revision 1.1.1.1 2010/03/23 21:10:17 ajacoutot * Import ptlib-2.6.5 * @@ -246,7 +251,7 @@ PBoolean PSoundChannelSNDIO::Write(const void * buf, PINDEX len) return FALSE; } len -= did; - (char *)buf += did; + buf = (char*)buf + did; tot += did; } lastWriteCount += tot; @@ -270,7 +275,7 @@ PBoolean PSoundChannelSNDIO::Read(void * buf, PINDEX len) return FALSE; } len -= did; - (char *)buf += did; + buf = (char*)buf + did; tot += did; } lastReadCount += tot; diff --git a/devel/ptlib/patches/patch-include_ptlib_safecoll_h b/devel/ptlib/patches/gcc3-patch-include_ptlib_safecoll_h similarity index 96% rename from devel/ptlib/patches/patch-include_ptlib_safecoll_h rename to devel/ptlib/patches/gcc3-patch-include_ptlib_safecoll_h index e860b4af1aa..ede06504418 100644 --- a/devel/ptlib/patches/patch-include_ptlib_safecoll_h +++ b/devel/ptlib/patches/gcc3-patch-include_ptlib_safecoll_h @@ -1,4 +1,4 @@ -$OpenBSD: patch-include_ptlib_safecoll_h,v 1.1.1.1 2010/03/23 21:10:17 ajacoutot Exp $ +$OpenBSD: gcc3-patch-include_ptlib_safecoll_h,v 1.1 2010/05/11 07:23:23 espie Exp $ Make this build on gcc3. (reversed commit from upstream SVN)