| From f87ae3963e651fe9f4b3125192c77aae86c007e0 Mon Sep 17 00:00:00 2001 |
| From: Patrick Havelange <patrick.havelange@essensium.com> |
| Date: Mon, 21 Jan 2019 09:49:23 +0100 |
| Subject: [PATCH] Force to keep TPipedTransport::peek() to avoid linker error. |
| |
| Otherwise got the "defined in discarded section" linker error |
| with x86-64-musl toolchain. This is probably a toolchain issue - the |
| compiler shouldn't remove that function. |
| |
| Signed-off-by: Patrick Havelange <patrick.havelange@essensium.com> |
| Upstream-status: Not Applicable |
| --- |
| lib/cpp/src/thrift/transport/TTransportUtils.h | 2 +- |
| 1 file changed, 1 insertion(+), 1 deletion(-) |
| |
| diff --git a/lib/cpp/src/thrift/transport/TTransportUtils.h b/lib/cpp/src/thrift/transport/TTransportUtils.h |
| index f3b4c5a..7589182 100644 |
| --- a/lib/cpp/src/thrift/transport/TTransportUtils.h |
| +++ b/lib/cpp/src/thrift/transport/TTransportUtils.h |
| @@ -114,7 +114,7 @@ public: |
| |
| bool isOpen() { return srcTrans_->isOpen(); } |
| |
| - bool peek() { |
| + bool __attribute__ ((used)) peek() { |
| if (rPos_ >= rLen_) { |
| // Double the size of the underlying buffer if it is full |
| if (rLen_ == rBufSize_) { |
| -- |
| 2.17.1 |
| |