From fbdb6012937d950d8c86b864fe0317977f5447ed Mon Sep 17 00:00:00 2001 From: Peter Griess Date: Fri, 18 Apr 2014 13:06:07 -0700 Subject: [PATCH] Fix type mismatch in IOBuf::getIov() Summary: - On iOS, iovec::iov_len is a size_t, which is a uint32_t; convert Test Plan: - fbconfig -r folly && fbmake runtests - Builds in fbobjc Reviewed By: simpkins@fb.com FB internal diff: D1284931 --- folly/io/IOBuf.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/folly/io/IOBuf.cpp b/folly/io/IOBuf.cpp index 783c4553..f8a34fd0 100644 --- a/folly/io/IOBuf.cpp +++ b/folly/io/IOBuf.cpp @@ -882,7 +882,7 @@ folly::fbvector IOBuf::getIov() const { do { // some code can get confused by empty iovs, so skip them if (p->length() > 0) { - iov.push_back({(void*)p->data(), p->length()}); + iov.push_back({(void*)p->data(), folly::to(p->length())}); } p = p->next(); } while (p != this); -- 2.34.1