--- /dev/null
+Index: ignition-transport4-4.0.0/src/NodeShared.cc
+===================================================================
+--- ignition-transport4-4.0.0.orig/src/NodeShared.cc
++++ ignition-transport4-4.0.0/src/NodeShared.cc
+@@ -92,7 +92,8 @@ bool userPass(std::string &_user, std::s
+ // Helper to send messages
+ int sendHelper(zmq::socket_t &_pub, const std::string &_data, int _type)
+ {
+- zmq::message_t msg(_data.data(), _data.size());
++ zmq::message_t msg(_data.size());
++ memcpy(msg.data(), _data.data(), _data.size());
+ return _pub.send(msg, _type);
+ }
+
+@@ -278,10 +279,13 @@ bool NodeShared::Publish(
+ {
+ // Create the messages.
+ // Note that we use zero copy for passing the message data (msg2).
+- zmq::message_t msg0(_topic.data(), _topic.size()),
+- msg1(this->myAddress.data(), this->myAddress.size()),
++ zmq::message_t msg0(_topic.size()),
++ msg1(this->myAddress.size()),
+ msg2(_data, _dataSize, _ffn, nullptr),
+- msg3(_msgType.data(), _msgType.size());
++ msg3(_msgType.size());
++ memcpy(msg0.data(), _topic.data(), _topic.size());
++ memcpy(msg1.data(), this->myAddress.data(), this->myAddress.size());
++ memcpy(msg3.data(), _msgType.data(), _msgType.size());
+
+ // Send the messages
+ std::lock_guard<std::recursive_mutex> lock(this->mutex);
--- /dev/null
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit cmake-utils vcs-snapshot flag-o-matic
+
+DESCRIPTION="Combines ZeroMQ with Protobufs to create a fast and efficient message passing system"
+HOMEPAGE="http://ignitionrobotics.org/libraries/transport"
+SRC_URI="http://gazebosim.org/distributions/ign-transport/releases/${PN}4-${PV}.tar.bz2"
+
+LICENSE="Apache-2.0"
+SLOT="4/4"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND="
+ net-libs/ignition-msgs:1=
+ dev-libs/protobuf:=
+ >=net-libs/zeromq-3.2.0:=
+ sys-apps/util-linux
+ net-libs/cppzmq
+"
+RDEPEND="${DEPEND}"
+DEPEND="${DEPEND}
+ >=dev-util/ignition-cmake-0.4
+ virtual/pkgconfig"
+CMAKE_BUILD_TYPE=RelWithDebInfo
+S="${WORKDIR}/${PN}4-${PV}"
+PATCHES=( "${FILESDIR}/zmq.patch" )