diff options
author | Samuli Suominen <drac@gentoo.org> | 2008-05-14 12:24:09 +0000 |
---|---|---|
committer | Samuli Suominen <drac@gentoo.org> | 2008-05-14 12:24:09 +0000 |
commit | da3de681108f905e3e4f9613487ef31984328433 (patch) | |
tree | 9e29d4568205bd9c12ec3a77e4c7afb447fdcf27 /net-libs/libjingle | |
parent | Stable on ppc64; bug #221063 (diff) | |
download | gentoo-2-da3de681108f905e3e4f9613487ef31984328433.tar.gz gentoo-2-da3de681108f905e3e4f9613487ef31984328433.tar.bz2 gentoo-2-da3de681108f905e3e4f9613487ef31984328433.zip |
Fix building with GCC 4.3 wrt #220743, thanks to Peter Alfredsen.
(Portage version: 2.1.5_rc10)
Diffstat (limited to 'net-libs/libjingle')
-rw-r--r-- | net-libs/libjingle/ChangeLog | 8 | ||||
-rw-r--r-- | net-libs/libjingle/files/libjingle-0.3.11-gcc43.patch | 318 | ||||
-rw-r--r-- | net-libs/libjingle/libjingle-0.3.11.ebuild | 14 |
3 files changed, 334 insertions, 6 deletions
diff --git a/net-libs/libjingle/ChangeLog b/net-libs/libjingle/ChangeLog index 636585a26d08..b8735557d34e 100644 --- a/net-libs/libjingle/ChangeLog +++ b/net-libs/libjingle/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for net-libs/libjingle -# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-libs/libjingle/ChangeLog,v 1.9 2007/04/30 22:05:15 tester Exp $ +# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-libs/libjingle/ChangeLog,v 1.10 2008/05/14 12:24:09 drac Exp $ + + 14 May 2008; Samuli Suominen <drac@gentoo.org> + +files/libjingle-0.3.11-gcc43.patch, libjingle-0.3.11.ebuild: + Fix building with GCC 4.3 wrt #220743, thanks to Peter Alfredsen. *libjingle-0.3.11 (30 Apr 2007) diff --git a/net-libs/libjingle/files/libjingle-0.3.11-gcc43.patch b/net-libs/libjingle/files/libjingle-0.3.11-gcc43.patch new file mode 100644 index 000000000000..9b82d5ba03e8 --- /dev/null +++ b/net-libs/libjingle/files/libjingle-0.3.11-gcc43.patch @@ -0,0 +1,318 @@ +--- talk/base/asynctcpsocket.cc ++++ talk/base/asynctcpsocket.cc +@@ -32,12 +32,11 @@ + #include "talk/base/byteorder.h" + #include "talk/base/common.h" + #include "talk/base/logging.h" ++#include <string.h> + +-#if defined(_MSC_VER) && _MSC_VER < 1300 + namespace std { + using ::strerror; + } +-#endif + + #ifdef POSIX + extern "C" { +--- talk/base/bytebuffer.cc ++++ talk/base/bytebuffer.cc +@@ -30,6 +30,7 @@ + #include "talk/base/byteorder.h" + #include <algorithm> + #include <cassert> ++#include <string.h> + + #if defined(_MSC_VER) && _MSC_VER < 1300 + namespace std { +--- talk/base/host.cc ++++ talk/base/host.cc +@@ -33,6 +33,7 @@ + #include <iostream> + #include <cassert> + #include <errno.h> ++#include <cstdlib> + + #if defined(_MSC_VER) && _MSC_VER < 1300 + namespace std { +--- talk/base/logging.cc ++++ talk/base/logging.cc +@@ -33,6 +33,7 @@ + + #include <iostream> + #include <iomanip> ++#include <string.h> + + #include "talk/base/logging.h" + #include "talk/base/stream.h" +--- talk/base/messagequeue.h ++++ talk/base/messagequeue.h +@@ -35,6 +35,7 @@ + #include <vector> + #include <queue> + #include <algorithm> ++#include <string.h> + + namespace cricket { + +--- talk/base/physicalsocketserver.cc ++++ talk/base/physicalsocketserver.cc +@@ -30,6 +30,8 @@ + #endif + + #include <cassert> ++#include <string.h> ++#include <algorithm> + + #ifdef POSIX + extern "C" { +--- talk/base/protocolinfo.cc ++++ talk/base/protocolinfo.cc +@@ -27,6 +27,7 @@ + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + ++#include <string.h> + #include "talk/base/protocolinfo.h" + + namespace cricket { +--- talk/base/socketadapters.cc ++++ talk/base/socketadapters.cc +@@ -134,7 +134,7 @@ + int len = socket_->Recv(buffer_ + data_len_, buffer_size_ - data_len_); + if (len < 0) { + // TODO: Do something better like forwarding the error to the user. +- LOG(INFO) << "Recv: " << errno << " " << std::strerror(errno); ++ LOG(INFO) << "Recv: " << errno << " " << strerror(errno); + return; + } + +--- talk/base/stream.cc ++++ talk/base/stream.cc +@@ -29,6 +29,7 @@ + #include <sys/stat.h> + #include <errno.h> + #include <string> ++#include <string.h> + #include "talk/base/basictypes.h" + #include "talk/base/common.h" + #include "talk/base/stream.h" +--- talk/base/stringutils.h ++++ talk/base/stringutils.h +@@ -36,6 +36,7 @@ + #endif // WIN32 + + #include <string> ++#include <string.h> + + /////////////////////////////////////////////////////////////////////////////// + // Rename a bunch of common string functions so they are consistent across +--- talk/base/xmpppassword.h ++++ talk/base/xmpppassword.h +@@ -30,6 +30,7 @@ + + #include "talk/base/linked_ptr.h" + #include "talk/base/scoped_ptr.h" ++#include <string.h> + + namespace buzz { + +--- talk/p2p/base/port.cc ++++ talk/p2p/base/port.cc +@@ -265,7 +265,7 @@ + + if (stun_msg->type() == STUN_BINDING_REQUEST) { + if ((remote_frag_len < 0) +- || (std::memcmp(username_attr->bytes(), ++ || (::memcmp(username_attr->bytes(), + username_frag_.c_str(), username_frag_.size()) != 0)) { + LOG(LERROR) << "Received STUN request with bad username"; + SendBindingErrorResponse(stun_msg.get(), addr, STUN_ERROR_BAD_REQUEST, +@@ -278,7 +278,7 @@ + } else if ((stun_msg->type() == STUN_BINDING_RESPONSE) + || (stun_msg->type() == STUN_BINDING_ERROR_RESPONSE)) { + if ((remote_frag_len < 0) +- || (std::memcmp(username_attr->bytes() + remote_frag_len, ++ || (::memcmp(username_attr->bytes() + remote_frag_len, + username_frag_.c_str(), username_frag_.size()) != 0)) { + LOG(LERROR) << "Received STUN response with bad username"; + // Do not send error response to a response +@@ -723,7 +723,7 @@ + if (valid) { + std::string username_fragment = port_->username_fragment(); + int offset = (int)(username_attr->length() - username_fragment.size()); +- if (std::memcmp(username_attr->bytes() + offset, ++ if (::memcmp(username_attr->bytes() + offset, + username_fragment.c_str(), username_fragment.size()) != 0) { + LOG(LERROR) << "Received STUN response with bad username"; + valid = false; +--- talk/p2p/base/pseudotcp.cc ++++ talk/p2p/base/pseudotcp.cc +@@ -33,6 +33,8 @@ + #include "talk/base/socket.h" + #include "talk/base/time.h" + #include "talk/p2p/base/pseudotcp.h" ++#include <string.h> ++#include <stdlib.h> + + #define _DBG_NONE 0 + #define _DBG_NORMAL 1 +--- talk/p2p/base/relayport.cc ++++ talk/p2p/base/relayport.cc +@@ -37,6 +37,7 @@ + #ifdef OSX + #include <errno.h> + #endif ++#include <string.h> + + #if defined(_MSC_VER) && _MSC_VER < 1300 + namespace std { +@@ -212,7 +213,7 @@ + if (size < 24 + magic_cookie_.size()) { + return false; + } else { +- return 0 == std::memcmp(data + 24, ++ return 0 == ::memcmp(data + 24, + magic_cookie_.c_str(), + magic_cookie_.size()); + } +@@ -375,7 +376,7 @@ + + socket_->SignalReadPacket.connect(this, &RelayEntry::OnReadPacket); + if (socket_->Bind(local_addr_) < 0) +- LOG(INFO) << "bind: " << std::strerror(socket_->GetError()); ++ LOG(INFO) << "bind: " << ::strerror(socket_->GetError()); + + for (unsigned i = 0; i < port_->options().size(); ++i) + socket_->SetOption(port_->options()[i].first, port_->options()[i].second); +@@ -568,7 +569,7 @@ + } + int sent = socket_->SendTo(data, size, ra->address); + if (sent <= 0) { +- LOG(LS_VERBOSE) << "sendto: " << std::strerror(socket_->GetError()); ++ LOG(LS_VERBOSE) << "sendto: " << ::strerror(socket_->GetError()); + assert(sent < 0); + } + return sent; +--- talk/p2p/base/relayserver_main.cc ++++ talk/p2p/base/relayserver_main.cc +@@ -30,6 +30,7 @@ + #include "talk/base/host.h" + #include "talk/base/thread.h" + #include "talk/p2p/base/relayserver.h" ++#include <string.h> + + #ifdef POSIX + extern "C" { +@@ -53,13 +54,13 @@ + + AsyncUDPSocket* int_socket = CreateAsyncUDPSocket(pthMain->socketserver()); + if (int_socket->Bind(int_addr) < 0) { +- std::cerr << "bind: " << std::strerror(errno) << std::endl; ++ std::cerr << "bind: " << ::strerror(errno) << std::endl; + return 1; + } + + AsyncUDPSocket* ext_socket = CreateAsyncUDPSocket(pthMain->socketserver()); + if (ext_socket->Bind(ext_addr) < 0) { +- std::cerr << "bind: " << std::strerror(errno) << std::endl; ++ std::cerr << "bind: " << ::strerror(errno) << std::endl; + return 1; + } + +--- talk/p2p/base/stun.cc ++++ talk/p2p/base/stun.cc +@@ -29,6 +29,7 @@ + #include "talk/p2p/base/stun.h" + #include <iostream> + #include <cassert> ++#include <string.h> + + #if defined(_MSC_VER) && _MSC_VER < 1300 + namespace std { +@@ -384,7 +385,7 @@ + + void StunByteStringAttribute::CopyBytes(const void* bytes, uint16 length) { + char* new_bytes = new char[length]; +- std::memcpy(new_bytes, bytes, length); ++ memcpy(new_bytes, bytes, length); + SetBytes(new_bytes, length); + } + +--- talk/p2p/base/stunserver.cc ++++ talk/p2p/base/stunserver.cc +@@ -28,6 +28,7 @@ + #include "talk/base/bytebuffer.h" + #include "talk/p2p/base/stunserver.h" + #include <iostream> ++#include <string.h> + + #ifdef POSIX + extern "C" { +@@ -154,7 +155,7 @@ + // TODO: Allow response addr attribute if sent from another stun server. + + if (socket_->SendTo(buf.Data(), buf.Length(), addr) < 0) +- std::cerr << "sendto: " << std::strerror(errno) << std::endl; ++ std::cerr << "sendto: " << ::strerror(errno) << std::endl; + } + + } // namespace cricket +--- talk/p2p/base/stunserver_main.cc ++++ talk/p2p/base/stunserver_main.cc +@@ -50,7 +50,7 @@ + + AsyncUDPSocket* server_socket = CreateAsyncUDPSocket(pthMain->socketserver()); + if (server_socket->Bind(server_addr) < 0) { +- std::cerr << "bind: " << std::strerror(errno) << std::endl; ++ std::cerr << "bind: " << ::strerror(errno) << std::endl; + return 1; + } + +--- talk/p2p/base/tcpport.cc ++++ talk/p2p/base/tcpport.cc +@@ -35,6 +35,7 @@ + #endif // WIN32 + #include <iostream> + #include <cassert> ++#include <string.h> + + #if defined(_MSC_VER) && _MSC_VER < 1300 + namespace std { +@@ -61,7 +62,7 @@ + socket_ = thread->socketserver()->CreateAsyncSocket(SOCK_STREAM); + socket_->SignalReadEvent.connect(this, &TCPPort::OnAcceptEvent); + if (socket_->Bind(address) < 0) +- LOG(INFO) << "bind: " << std::strerror(socket_->GetError()); ++ LOG(INFO) << "bind: " << ::strerror(socket_->GetError()); + } + + TCPPort::~TCPPort() { +@@ -111,7 +112,7 @@ + #endif // WIN32 + if (allow_listen) { + if (socket_->Listen(5) < 0) +- LOG(INFO) << "listen: " << std::strerror(socket_->GetError()); ++ LOG(INFO) << "listen: " << ::strerror(socket_->GetError()); + } else { + LOG(INFO) << "not listening due to firewall restrictions"; + } +@@ -157,7 +158,7 @@ + AsyncSocket * newsocket = static_cast<AsyncSocket *>(socket->Accept(&incoming.addr)); + if (!newsocket) { + // TODO: Do something better like forwarding the error to the user. +- LOG(INFO) << "accept: " << socket_->GetError() << " " << std::strerror(socket_->GetError()); ++ LOG(INFO) << "accept: " << socket_->GetError() << " " << ::strerror(socket_->GetError()); + return; + } + incoming.socket = new AsyncTCPSocket(newsocket); +--- talk/session/phone/voicechannel.cc ++++ talk/session/phone/voicechannel.cc +@@ -159,7 +159,7 @@ + channel_->OnPacketReceived(data, (int)len); + } + +-void VoiceChannel::SendPacket(const void *data, unsigned int len) { ++void VoiceChannel::SendPacket(const void *data, size_t len) { + // SendPacket gets called from MediaEngine; send to socket + // MediaEngine will call us on a random thread. The Send operation on the socket is + // special in that it can handle this. diff --git a/net-libs/libjingle/libjingle-0.3.11.ebuild b/net-libs/libjingle/libjingle-0.3.11.ebuild index a4b0998fa3d6..3a447a5a3c62 100644 --- a/net-libs/libjingle/libjingle-0.3.11.ebuild +++ b/net-libs/libjingle/libjingle-0.3.11.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2007 Gentoo Foundation +# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-libs/libjingle/libjingle-0.3.11.ebuild,v 1.1 2007/04/30 22:05:15 tester Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-libs/libjingle/libjingle-0.3.11.ebuild,v 1.2 2008/05/14 12:24:09 drac Exp $ inherit eutils @@ -9,16 +9,22 @@ HOMEPAGE="http://tapioca-voip.sourceforge.net/" SRC_URI="mirror://sourceforge/tapioca-voip/${P}.tar.gz" LICENSE="BSD" +SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="" -SLOT="0" RDEPEND="dev-libs/openssl dev-libs/expat" DEPEND="${RDEPEND} dev-util/pkgconfig" +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${P}-gcc43.patch +} + src_install() { - emake DESTDIR="${D}" install || die "emake install failed" + emake DESTDIR="${D}" install || die "emake install failed." dodoc AUTHORS ChangeLog NEWS README } |