make it compile on gcc4, by making the relevant patch dependent on

compiler version.
also removes lvalue cast, that's not ansi.
This commit is contained in:
espie 2010-05-11 07:23:23 +00:00
parent 5bb0477760
commit fd85f9241d
3 changed files with 14 additions and 4 deletions

View File

@ -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 <bsd.own.mk>
.if !${COMPILER_VERSION:L:Mgcc4}
PATCH_LIST = patch-* gcc3-patch-*
.endif
CONFIGURE_STYLE=gnu
CONFIGURE_ARGS= ${CONFIGURE_SHARED} \
--with-plugin-installdir=ptlib \

View File

@ -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;

View File

@ -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)