1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-26 12:27:52 +00:00

Build fix for older GCC versions. (#710)

Add some older OS versions to the build matrix to make sure we don't
inadvertantly break the build.

This resolves issue #708.
This commit is contained in:
Brenden Matthews 2018-12-19 11:11:24 -05:00 committed by GitHub
parent 37c3c9f1e9
commit 2c816b1392
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 167 additions and 3 deletions

View File

@ -1,6 +1,126 @@
language: cpp
matrix:
include:
- os: linux
dist: xenial
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5
- cmake
- libxdamage-dev
- libx11-dev
- libxft-dev
- libxext-dev
- libglib2.0-dev
- libxml2-dev
- libcurl4-gnutls-dev
- liblua5.1-0-dev
- libtolua++5.1-dev
- libcairo2-dev
- libimlib2-dev
- libxinerama-dev
- libmysqlclient-dev
- libical-dev
- libircclient-dev
- libcairo2-dev
- libmicrohttpd-dev
- ncurses-dev
- liblua5.1-dev
- librsvg2-dev
- libaudclient-dev
- libxmmsclient-dev
- libpulse-dev
- libcurl4-gnutls-dev
- audacious-dev
- libsystemd-dev
- libxml2-dev
- tolua++
- gawk
env:
- MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"
- os: linux
dist: xenial
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
- cmake
- libxdamage-dev
- libx11-dev
- libxft-dev
- libxext-dev
- libglib2.0-dev
- libxml2-dev
- libcurl4-gnutls-dev
- liblua5.1-0-dev
- libtolua++5.1-dev
- libcairo2-dev
- libimlib2-dev
- libxinerama-dev
- libmysqlclient-dev
- libical-dev
- libircclient-dev
- libcairo2-dev
- libmicrohttpd-dev
- ncurses-dev
- liblua5.1-dev
- librsvg2-dev
- libaudclient-dev
- libxmmsclient-dev
- libpulse-dev
- libcurl4-gnutls-dev
- audacious-dev
- libsystemd-dev
- libxml2-dev
- tolua++
- gawk
env:
- MATRIX_EVAL="CC=gcc-6 && CXX=g++-6"
- os: linux
dist: xenial
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
- cmake
- libxdamage-dev
- libx11-dev
- libxft-dev
- libxext-dev
- libglib2.0-dev
- libxml2-dev
- libcurl4-gnutls-dev
- liblua5.1-0-dev
- libtolua++5.1-dev
- libcairo2-dev
- libimlib2-dev
- libxinerama-dev
- libmysqlclient-dev
- libical-dev
- libircclient-dev
- libcairo2-dev
- libmicrohttpd-dev
- ncurses-dev
- liblua5.1-dev
- librsvg2-dev
- libaudclient-dev
- libxmmsclient-dev
- libpulse-dev
- libcurl4-gnutls-dev
- audacious-dev
- libsystemd-dev
- libxml2-dev
- tolua++
- gawk
env:
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
- os: linux
dist: xenial
addons:
@ -41,6 +161,46 @@ matrix:
- gawk
env:
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
- os: linux
dist: xenial
addons:
apt:
sources:
- llvm-toolchain-xenial-6.0
packages:
- clang-6.0
- cmake
- libxdamage-dev
- libx11-dev
- libxft-dev
- libxext-dev
- libglib2.0-dev
- libxml2-dev
- libcurl4-gnutls-dev
- liblua5.1-0-dev
- libtolua++5.1-dev
- libcairo2-dev
- libimlib2-dev
- libxinerama-dev
- libmysqlclient-dev
- libical-dev
- libircclient-dev
- libcairo2-dev
- libmicrohttpd-dev
- ncurses-dev
- liblua5.1-dev
- librsvg2-dev
- libaudclient-dev
- libxmmsclient-dev
- libpulse-dev
- libcurl4-gnutls-dev
- audacious-dev
- libsystemd-dev
- libxml2-dev
- tolua++
- gawk
env:
- MATRIX_EVAL="CC=clang-6.0 && CXX=clang++-6.0"
- os: linux
dist: xenial
addons:
@ -86,6 +246,10 @@ matrix:
secure: "KikPusy+HXcEVLr0Dqb6mkrefDU5jm7EGQ5fwO4sBG7bRMcnHV3V14s5yB4Ol8btpUC0nkNn/41+f37lkG+oT4y9ZeIH2ZrhsSEHxOgH6DF9ZSVJwtpLrF9siWgfZ0m5c5V7U5rzVYL3jlO1hQfXKCfMNAcwlKcEUrfpk7jVEZc="
env:
- MATRIX_EVAL="CC=clang-7 && CXX=clang++-7"
- os: osx
osx_image: xcode9.4
- os: osx
osx_image: xcode10
- os: osx
osx_image: xcode10.1
before_install:
@ -171,6 +335,6 @@ branches:
- master
sudo: false
cache:
- ccache
- ccache: true
- directories:
- '$HOME/.sonar/cache'

View File

@ -302,7 +302,7 @@ char *save_set_string(char *x, char *y) {
void update_gateway_info_failure(const char *reason) {
if (reason != nullptr) { perror(reason); }
// 2 pointers to 1 location causes a crash when we try to free them both
std::unique_lock lock(gw_info.mutex);
std::unique_lock<std::mutex> lock(gw_info.mutex);
free_and_zero(gw_info.iface);
free_and_zero(gw_info.ip);
gw_info.iface = strndup("failed", text_buffer_size.get(*state));
@ -388,7 +388,7 @@ int update_gateway_info(void) {
if (!(dest || mask) && ((flags & RTF_GATEWAY) || !gate)) {
gw_info.count++;
snprintf(e_iface, 49, "%s", iface);
std::unique_lock lock(gw_info.mutex);
std::unique_lock<std::mutex> lock(gw_info.mutex);
gw_info.iface = save_set_string(gw_info.iface, iface);
ina.s_addr = gate;
gw_info.ip = save_set_string(gw_info.ip, inet_ntoa(ina));