From 2e90c74987774f4a66dc3ca1ed09cf09d630172f Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Fri, 19 Aug 2016 12:35:27 +0100 Subject: Fix m_ldap not linking to liblber on UNIX systems. --- src/modules/extra/m_ldap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/extra/m_ldap.cpp b/src/modules/extra/m_ldap.cpp index bf3809a24..698738145 100644 --- a/src/modules/extra/m_ldap.cpp +++ b/src/modules/extra/m_ldap.cpp @@ -27,7 +27,7 @@ # pragma comment(lib, "liblber.lib") #endif -/* $LinkerFlags: -lldap_r */ +/* $LinkerFlags: -lldap_r -llber */ class LDAPService; -- cgit v1.2.3 From a7ca68ff7249da865b5b572b6430cf2e5d34b7c3 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Fri, 19 Aug 2016 12:56:01 +0100 Subject: Fix a build error in the poll socket engine. --- src/socketengines/socketengine_poll.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/socketengines/socketengine_poll.cpp b/src/socketengines/socketengine_poll.cpp index 5fd7e6235..041a5ba75 100644 --- a/src/socketengines/socketengine_poll.cpp +++ b/src/socketengines/socketengine_poll.cpp @@ -217,7 +217,7 @@ int SocketEngine::DispatchEvents() // The vector could've been resized, reference can be invalid by now; don't use it events[index].events = mask_to_poll(mask); - eh->eh->OnEventHandlerWrite(); + eh->OnEventHandlerWrite(); } } -- cgit v1.2.3 From 2a419c75253ff9b566888ffcda031f25414201f9 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Fri, 19 Aug 2016 13:47:37 +0100 Subject: Fix linker flags being in the wrong place on static builds. --- make/unit-cc.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/make/unit-cc.pl b/make/unit-cc.pl index a06d7b10f..f04423ce3 100755 --- a/make/unit-cc.pl +++ b/make/unit-cc.pl @@ -80,18 +80,19 @@ sub do_static_find { sub do_static_link { my $execstr = "$ENV{CXX} -o $out $ENV{CORELDFLAGS}"; + my $link_flags = ''; for (@ARGV) { if (/\.cmd$/) { open F, '<', $_; my $libs = ; chomp $libs; - $execstr .= ' '.$libs; + $link_flags .= ' '.$libs; close F; } else { $execstr .= ' '.$_; } } - $execstr .= ' '.$ENV{LDLIBS}; + $execstr .= ' '.$ENV{LDLIBS}.' '.$link_flags; message 'LINK', $out, $execstr; exec $execstr; } -- cgit v1.2.3 From 047e30a4179acb6cfe926c5f6fc4e447addd69ed Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Fri, 19 Aug 2016 13:59:07 +0100 Subject: Fix poll using int instead of size_t which caused a warning. --- src/socketengines/socketengine_poll.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/socketengines/socketengine_poll.cpp b/src/socketengines/socketengine_poll.cpp index 041a5ba75..59991d80d 100644 --- a/src/socketengines/socketengine_poll.cpp +++ b/src/socketengines/socketengine_poll.cpp @@ -168,7 +168,7 @@ int SocketEngine::DispatchEvents() int processed = 0; ServerInstance->UpdateTime(); - for (int index = 0; index < CurrentSetSize && processed < i; index++) + for (size_t index = 0; index < CurrentSetSize && processed < i; index++) { struct pollfd& pfd = events[index]; -- cgit v1.2.3 From 9f364d430460c07a2abad0f7501e063628b850f1 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Fri, 19 Aug 2016 14:15:34 +0100 Subject: Don't try to run `inspircd --version` after doing a Travis build. All of the files will have already been removed by test-build. --- tools/travis-ci.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/travis-ci.sh b/tools/travis-ci.sh index 8828532b0..521d91e38 100755 --- a/tools/travis-ci.sh +++ b/tools/travis-ci.sh @@ -16,4 +16,3 @@ fi set -e export TEST_BUILD_MODULES="m_geoip.cpp,m_ldap.cpp,m_mysql.cpp,m_pgsql.cpp,m_regex_pcre.cpp,m_regex_posix.cpp,m_regex_tre.cpp,m_sqlite3.cpp,m_ssl_gnutls.cpp,m_ssl_openssl.cpp" ./tools/test-build $CXX -./run/bin/inspircd --version -- cgit v1.2.3 From a6daa312e26532d68ffa70f6cf350baa5d43ca83 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Fri, 19 Aug 2016 14:44:17 +0100 Subject: Fix m_mysql warning about use of C++11 features on C++03. NO_CLIENT_LONG_LONG was removed in a recent version of MySQL. --- src/modules/extra/m_mysql.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp index d8dda27a4..e65a8de92 100644 --- a/src/modules/extra/m_mysql.cpp +++ b/src/modules/extra/m_mysql.cpp @@ -20,8 +20,12 @@ */ -/* Stop mysql wanting to use long long */ -#define NO_CLIENT_LONG_LONG +// Fix warnings about the use of `long long` on C++03. +#if defined __clang__ +# pragma clang diagnostic ignored "-Wc++11-long-long" +#elif defined __GNUC__ +# pragma GCC diagnostic ignored "-Wlong-long" +#endif #include "inspircd.h" #include -- cgit v1.2.3