Leave BIO_METHOD non-const.
This breaks building against OpenSSL upstream, which is still supported on iOS.
This reverts part of https://webrtc-codereview.appspot.com/34649004.
BUG=none
R=juberti@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/36879004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8132 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/base/openssladapter.cc b/webrtc/base/openssladapter.cc
index 5caad17..56610fa 100644
--- a/webrtc/base/openssladapter.cc
+++ b/webrtc/base/openssladapter.cc
@@ -74,7 +74,8 @@
static int socket_new(BIO* h);
static int socket_free(BIO* data);
-static const BIO_METHOD methods_socket = {
+// TODO(davidben): This should be const once BoringSSL is assumed.
+static BIO_METHOD methods_socket = {
BIO_TYPE_BIO,
"socket",
socket_write,
@@ -87,7 +88,7 @@
NULL,
};
-static const BIO_METHOD* BIO_s_socket2() { return(&methods_socket); }
+static BIO_METHOD* BIO_s_socket2() { return(&methods_socket); }
static BIO* BIO_new_socket(rtc::AsyncSocket* socket) {
BIO* ret = BIO_new(BIO_s_socket2());
diff --git a/webrtc/base/opensslstreamadapter.cc b/webrtc/base/opensslstreamadapter.cc
index c88ae04..c18295f 100644
--- a/webrtc/base/opensslstreamadapter.cc
+++ b/webrtc/base/opensslstreamadapter.cc
@@ -67,7 +67,8 @@
static int stream_new(BIO* h);
static int stream_free(BIO* data);
-static const BIO_METHOD methods_stream = {
+// TODO(davidben): This should be const once BoringSSL is assumed.
+static BIO_METHOD methods_stream = {
BIO_TYPE_BIO,
"stream",
stream_write,
@@ -80,7 +81,7 @@
NULL,
};
-static const BIO_METHOD* BIO_s_stream() { return(&methods_stream); }
+static BIO_METHOD* BIO_s_stream() { return(&methods_stream); }
static BIO* BIO_new_stream(StreamInterface* stream) {
BIO* ret = BIO_new(BIO_s_stream());