Skip to content

Commit dfbfd92

Browse files
authored
Merge pull request #952 from kovdan01/fix_name_conflicts
Fix name conflicts (C++)
2 parents 6b6a05e + e487321 commit dfbfd92

File tree

7 files changed

+17
-11
lines changed

7 files changed

+17
-11
lines changed

.github/depends/boost.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ while getopts "b:t:" c; do
3333
esac
3434
done
3535

36-
wget https://dl.bintray.com/boostorg/release/1.71.0/source/boost_1_71_0.tar.bz2
37-
tar xf boost_1_71_0.tar.bz2
38-
cd boost_1_71_0
36+
wget https://boostorg.jfrog.io/artifactory/main/release/1.72.0/source/boost_1_72_0.tar.bz2
37+
tar xf boost_1_72_0.tar.bz2
38+
cd boost_1_72_0
3939
./bootstrap.sh
4040

4141
build()

.github/workflows/coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
uses: actions/cache@v1
2727
with:
2828
path: usr
29-
key: ${{ runner.os }}-boost-20200401
29+
key: ${{ runner.os }}-boost-20210508-1-72-0
3030
- name: Build boost
3131
if: steps.cache-boost.outputs.cache-hit != 'true'
3232
run: ./.github/depends/boost.sh -b both -t gcc

.github/workflows/gha.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
uses: actions/cache@v1
2424
with:
2525
path: usr
26-
key: ${{ runner.os }}-boost-20200107
26+
key: ${{ runner.os }}-boost-20210508-1-72-0
2727
- name: Build boost
2828
if: steps.cache-boost.outputs.cache-hit != 'true'
2929
run: ./.github/depends/boost.sh -b 64 -t clang
@@ -102,7 +102,7 @@ jobs:
102102
uses: actions/cache@v1
103103
with:
104104
path: usr
105-
key: ${{ runner.os }}-boost-20200107
105+
key: ${{ runner.os }}-boost-20210508-1-72-0
106106
- name: Build boost
107107
if: steps.cache-boost.outputs.cache-hit != 'true'
108108
run: ./.github/depends/boost.sh -b both -t gcc
@@ -251,6 +251,7 @@ jobs:
251251
vcpkg update
252252
vcpkg install gtest:x64-windows
253253
vcpkg install zlib:x64-windows
254+
vcpkg install boost:x64-windows
254255
- name: Build and test
255256
shell: powershell
256257
run: |

ci/build_regression.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ then
2222
exit 1
2323
fi
2424

25-
cmake -DMSGPACK_FUZZ_REGRESSION="ON" -DMSGPACK_CXX11="ON" -DMSGPACK_SAN=${MSGPACK_SAN} -v ..
25+
cmake -DMSGPACK_FUZZ_REGRESSION="ON" -DMSGPACK_CXX11="ON" -DMSGPACK_SAN=${MSGPACK_SAN} ..
2626

2727
ret=$?
2828
if [ $ret -ne 0 ]

include/msgpack/v1/vrefbuffer.hpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,16 @@
2626

2727
#if defined(unix) || defined(__unix) || defined(__APPLE__) || defined(__OpenBSD__)
2828
#include <sys/uio.h>
29+
namespace msgpack {
30+
typedef ::iovec iovec;
31+
} // namespace msgpack
2932
#else
33+
namespace msgpack {
3034
struct iovec {
3135
void *iov_base;
3236
size_t iov_len;
3337
};
38+
} // namespace msgpack
3439
#endif
3540

3641
namespace msgpack {
@@ -183,7 +188,7 @@ class vrefbuffer {
183188
}
184189
}
185190

186-
const struct iovec* vector() const
191+
const iovec* vector() const
187192
{
188193
return m_array;
189194
}

test/buffer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ TEST(buffer, vrefbuffer)
4242
vbuf.write("a", 1);
4343
vbuf.write("a", 1);
4444

45-
const struct iovec* vec = vbuf.vector();
45+
const msgpack::iovec* vec = vbuf.vector();
4646
size_t veclen = vbuf.vector_size();
4747

4848
msgpack::sbuffer sbuf;

test/msgpack_vref.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ using namespace std;
3434
test_type val1 = v[i]; \
3535
msgpack::pack(vbuf, val1); \
3636
msgpack::sbuffer sbuf; \
37-
const struct iovec* cur = vbuf.vector(); \
38-
const struct iovec* end = cur + vbuf.vector_size(); \
37+
const msgpack::iovec* cur = vbuf.vector(); \
38+
const msgpack::iovec* end = cur + vbuf.vector_size(); \
3939
for(; cur != end; ++cur) \
4040
sbuf.write((const char*)cur->iov_base, cur->iov_len); \
4141
msgpack::object_handle oh; \

0 commit comments

Comments
 (0)