1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-13 10:59:13 +02:00
openwrt-packages/libs/fbzmq/patches/010-move.patch
Rosen Penev 50f8657141 fbzmq: Fix compilation with newer GCC
Added -faligned-new to fix compilation.

As fbzmq is passing -Werror, fixed compilation with newer GCC versions.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2019-06-19 13:32:06 -07:00

32 lines
775 B
Diff

--- a/fbzmq/zmq/Message.cpp
+++ b/fbzmq/zmq/Message.cpp
@@ -35,7 +35,7 @@ Message::allocate(size_t size) noexcept {
if (rc != 0) {
return folly::makeUnexpected(Error());
}
- return std::move(msg);
+ return msg;
}
folly::Expected<Message, Error>
@@ -58,7 +58,7 @@ Message::wrapBuffer(std::unique_ptr<folly::IOBuf> buf) noexcept {
delete ptr;
return folly::makeUnexpected(Error());
}
- return std::move(msg);
+ return msg;
}
Message&
--- a/fbzmq/zmq/Socket.cpp
+++ b/fbzmq/zmq/Socket.cpp
@@ -449,7 +449,7 @@ SocketImpl::recv(int flags) const noexcept {
while (true) {
const int n = zmq_msg_recv(&(msg.msg_), ptr_, flags);
if (n >= 0) {
- return std::move(msg);
+ return msg;
}
const int err = zmq_errno();