Skip to content

Commit 05f654f

Browse files
authored
Merge pull request #1021 from drdzyk/cpp_master
fix detection of linux based os
2 parents 63511f2 + 07c5b00 commit 05f654f

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

.github/depends/zlib.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ while getopts "b:t:p:" c; do
2727
done
2828

2929
mkdir $prefix || exit 1
30-
wget https://zlib.net/zlib-1.2.11.tar.gz || exit 1
31-
tar -xf zlib-1.2.11.tar.gz || exit 1
32-
cd zlib-1.2.11
30+
wget https://zlib.net/zlib-1.2.12.tar.gz || exit 1
31+
tar -xf zlib-1.2.12.tar.gz || exit 1
32+
cd zlib-1.2.12
3333

3434
build()
3535
{

.github/workflows/gha.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
uses: actions/cache@v2
3737
with:
3838
path: ~/zlib-prefix/
39-
key: ${{ runner.os }}-zlib-1-2-11-2021-08-09
39+
key: ${{ runner.os }}-zlib-1-2-12-2021-08-09
4040

4141
- name: Build zlib
4242
if: steps.cache-zlib.outputs.cache-hit != 'true'
@@ -111,7 +111,7 @@ jobs:
111111
uses: actions/cache@v2
112112
with:
113113
path: ~/zlib-prefix/
114-
key: ${{ runner.os }}-zlib-1-2-11-2021-08-09
114+
key: ${{ runner.os }}-zlib-1-2-12-2021-08-09
115115

116116
- name: Build zlib
117117
if: steps.cache-zlib.outputs.cache-hit != 'true'

appveyor.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,18 @@ environment:
2323
boost_subdir: lib32-msvc-14.0
2424
build_script:
2525
- ps: |
26-
appveyor DownloadFile http://zlib.net/zlib-1.2.11.tar.gz -FileName zlib-1.2.11.tar.gz
27-
7z x zlib-1.2.11.tar.gz 2> $null
28-
7z x zlib-1.2.11.tar 2> $null
29-
cd zlib-1.2.11
26+
appveyor DownloadFile http://zlib.net/zlib-1.2.12.tar.gz -FileName zlib-1.2.12.tar.gz
27+
7z x zlib-1.2.12.tar.gz 2> $null
28+
7z x zlib-1.2.12.tar 2> $null
29+
cd zlib-1.2.12
3030
3131
md build
3232
md prefix
3333
cd build
3434
3535
cmake `
3636
-G $env:msvc `
37-
-D CMAKE_INSTALL_PREFIX="$env:APPVEYOR_BUILD_FOLDER\zlib-1.2.11\prefix" `
37+
-D CMAKE_INSTALL_PREFIX="$env:APPVEYOR_BUILD_FOLDER\zlib-1.2.12\prefix" `
3838
..
3939
if ($LastExitCode -ne 0) { exit $LastExitCode }
4040
@@ -52,7 +52,7 @@ build_script:
5252
-D MSGPACK_BUILD_EXAMPLES=ON `
5353
-D MSGPACK_BUILD_TESTS=ON `
5454
-D CMAKE_EXE_LINKER_FLAGS=/LIBPATH:"$env:boost_prefix\$env:boost_subdir" `
55-
-D CMAKE_PREFIX_PATH="$env:boost_prefix;$env:APPVEYOR_BUILD_FOLDER\zlib-1.2.11\prefix" `
55+
-D CMAKE_PREFIX_PATH="$env:boost_prefix;$env:APPVEYOR_BUILD_FOLDER\zlib-1.2.12\prefix" `
5656
-D CMAKE_INSTALL_PREFIX="$env:APPVEYOR_BUILD_FOLDER\prefix" `
5757
-D CMAKE_CXX_FLAGS="/D_VARIADIC_MAX=10 /EHsc /DBOOST_ALL_DYN_LINK" `
5858
..
@@ -62,5 +62,5 @@ build_script:
6262
if ($LastExitCode -ne 0) { exit $LastExitCode }
6363
6464
test_script:
65-
- set PATH=%PATH%;%APPVEYOR_BUILD_FOLDER%\zlib-1.2.11\build\Release;%APPVEYOR_BUILD_FOLDER%\build\release;%boost_prefix%\%boost_subdir%
65+
- set PATH=%PATH%;%APPVEYOR_BUILD_FOLDER%\zlib-1.2.12\build\Release;%APPVEYOR_BUILD_FOLDER%\build\release;%boost_prefix%\%boost_subdir%
6666
- ctest -VV -C Release

include/msgpack/predef/os/linux.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Distributed under the Boost Software License, Version 1.0.
2727
#define MSGPACK_OS_LINUX MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
2828

2929
#if !defined(MSGPACK_PREDEF_DETAIL_OS_DETECTED) && ( \
30-
defined(linux) || defined(__linux) \
30+
defined(linux) || defined(__linux) || defined(__linux__) \
3131
)
3232
# undef MSGPACK_OS_LINUX
3333
# define MSGPACK_OS_LINUX MSGPACK_VERSION_NUMBER_AVAILABLE

include/msgpack/sysdep.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
#elif defined(unix) || defined(__unix) || defined(__APPLE__) || defined(__OpenBSD__)
8989

9090
#include <arpa/inet.h> /* __BYTE_ORDER */
91-
# if defined(linux)
91+
# if defined(linux) || defined(__linux__)
9292
# include <byteswap.h>
9393
# endif
9494

0 commit comments

Comments
 (0)