From 6d20b700fc8bc285fd58dceb73c89baf58592ddd Mon Sep 17 00:00:00 2001
From: Kevin Smith <git@kismith.co.uk>
Date: Mon, 15 Nov 2010 15:55:33 +0000
Subject: Fix compilation on OS X


diff --git a/Swiften/Queries/IQRouter.cpp b/Swiften/Queries/IQRouter.cpp
index 7fa2dcf..6e80b3f 100644
--- a/Swiften/Queries/IQRouter.cpp
+++ b/Swiften/Queries/IQRouter.cpp
@@ -34,7 +34,9 @@ void IQRouter::handleIQ(boost::shared_ptr<IQ> iq) {
 
 	bool handled = false;
 	// Go through the handlers in reverse order, to give precedence to the last added handler
-	for (std::vector<boost::shared_ptr<IQHandler> >::const_reverse_iterator i = handlers_.rbegin(); i != handlers_.rend(); ++i) {
+	std::vector<boost::shared_ptr<IQHandler> >::const_reverse_iterator i = handlers_.rbegin();
+	std::vector<boost::shared_ptr<IQHandler> >::const_reverse_iterator rend = handlers_.rend();
+	for (; i != rend; ++i) {
 		handled |= (*i)->handleIQ(iq);
 		if (handled) {
 			break;
diff --git a/Swiften/TLS/OpenSSL/OpenSSLCertificate.cpp b/Swiften/TLS/OpenSSL/OpenSSLCertificate.cpp
index 8c6cb25..54457f4 100644
--- a/Swiften/TLS/OpenSSL/OpenSSLCertificate.cpp
+++ b/Swiften/TLS/OpenSSL/OpenSSLCertificate.cpp
@@ -21,7 +21,7 @@ OpenSSLCertificate::OpenSSLCertificate(boost::shared_ptr<X509> cert) : cert(cert
 
 
 OpenSSLCertificate::OpenSSLCertificate(const ByteArray& der) {
-	const unsigned char* p = reinterpret_cast<const unsigned char*>(der.getData());
+	unsigned char* p = reinterpret_cast<unsigned char*>(const_cast<char*>(der.getData()));
 	cert = boost::shared_ptr<X509>(d2i_X509(NULL, &p, der.getSize()), X509_free);
 	parse();
 }
-- 
cgit v0.10.2-6-g49f6