diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2017-01-13 20:57:59 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2017-01-13 20:57:59 +0100 |
commit | 1361602ea5e247de0e34698651ee936093f47de3 (patch) | |
tree | 600f6f1a1d889ab2af1545d8af9a264e34bb7931 | |
parent | b547bf6bbb036215531ade4d2870ac6eff1ce1a3 (diff) | |
download | weechat-1361602ea5e247de0e34698651ee936093f47de3.zip |
tests: fix compilation of tests on FreeBSD 11
Some includes were missing in .h files, and the tests must be linked
with intl and execinfo on FreeBSD.
27 files changed, 52 insertions, 0 deletions
diff --git a/src/core/wee-config.h b/src/core/wee-config.h index 15587890d..ece8dd752 100644 --- a/src/core/wee-config.h +++ b/src/core/wee-config.h @@ -23,6 +23,7 @@ #include <regex.h> #include <wctype.h> + #include "wee-config-file.h" struct t_gui_buffer; diff --git a/src/core/wee-hdata.h b/src/core/wee-hdata.h index 17cadad17..c7c615d3e 100644 --- a/src/core/wee-hdata.h +++ b/src/core/wee-hdata.h @@ -20,6 +20,8 @@ #ifndef WEECHAT_HDATA_H #define WEECHAT_HDATA_H 1 +#include <time.h> + #define HDATA_VAR(__struct, __name, __type, __update_allowed, \ __array_size, __hdata_name) \ hdata_new_var (hdata, #__name, offsetof (__struct, __name), \ diff --git a/src/core/wee-hook.h b/src/core/wee-hook.h index 0c9665a9c..d721138b6 100644 --- a/src/core/wee-hook.h +++ b/src/core/wee-hook.h @@ -22,6 +22,7 @@ #define WEECHAT_HOOK_H 1 #include <unistd.h> +#include <time.h> #ifdef HAVE_GNUTLS #include <gnutls/gnutls.h> diff --git a/src/core/wee-infolist.h b/src/core/wee-infolist.h index 1d83d9409..db5937313 100644 --- a/src/core/wee-infolist.h +++ b/src/core/wee-infolist.h @@ -20,6 +20,8 @@ #ifndef WEECHAT_INFOLIST_H #define WEECHAT_INFOLIST_H 1 +#include <time.h> + /* list structures */ enum t_infolist_type diff --git a/src/core/wee-util.h b/src/core/wee-util.h index 9faf36387..fe17e0117 100644 --- a/src/core/wee-util.h +++ b/src/core/wee-util.h @@ -20,6 +20,8 @@ #ifndef WEECHAT_UTIL_H #define WEECHAT_UTIL_H 1 +#include <time.h> + #ifdef HAVE_SYS_RESOURCE_H struct t_rlimit_resource { diff --git a/src/core/weechat.h b/src/core/weechat.h index 72454a98d..f53c26b21 100644 --- a/src/core/weechat.h +++ b/src/core/weechat.h @@ -26,6 +26,7 @@ #endif #include <stdio.h> +#include <time.h> #include <sys/time.h> #include <signal.h> diff --git a/src/gui/gui-chat.h b/src/gui/gui-chat.h index 1c9f4faf6..82d48c128 100644 --- a/src/gui/gui-chat.h +++ b/src/gui/gui-chat.h @@ -20,6 +20,8 @@ #ifndef WEECHAT_GUI_CHAT_H #define WEECHAT_GUI_CHAT_H 1 +#include <time.h> + struct t_hashtable; struct t_gui_window; struct t_gui_buffer; diff --git a/src/gui/gui-key.h b/src/gui/gui-key.h index de691472b..68a4b4568 100644 --- a/src/gui/gui-key.h +++ b/src/gui/gui-key.h @@ -20,6 +20,8 @@ #ifndef WEECHAT_GUI_KEY_H #define WEECHAT_GUI_KEY_H 1 +#include <time.h> + struct t_hashtable; #define GUI_KEY_BUFFER_BLOCK_SIZE 256 diff --git a/src/gui/gui-line.h b/src/gui/gui-line.h index d0430a9b2..5b1336377 100644 --- a/src/gui/gui-line.h +++ b/src/gui/gui-line.h @@ -20,6 +20,7 @@ #ifndef WEECHAT_GUI_LINE_H #define WEECHAT_GUI_LINE_H 1 +#include <time.h> #include <regex.h> struct t_infolist; diff --git a/src/plugins/exec/exec.h b/src/plugins/exec/exec.h index d034befe4..31003773c 100644 --- a/src/plugins/exec/exec.h +++ b/src/plugins/exec/exec.h @@ -20,6 +20,7 @@ #ifndef WEECHAT_EXEC_H #define WEECHAT_EXEC_H 1 +#include <unistd.h> #include <time.h> #define weechat_plugin weechat_exec_plugin diff --git a/src/plugins/irc/irc-channel.h b/src/plugins/irc/irc-channel.h index 57e82d11f..73a68b712 100644 --- a/src/plugins/irc/irc-channel.h +++ b/src/plugins/irc/irc-channel.h @@ -20,6 +20,8 @@ #ifndef WEECHAT_IRC_CHANNEL_H #define WEECHAT_IRC_CHANNEL_H 1 +#include <time.h> + #define IRC_CHANNEL_DEFAULT_CHANTYPES "#&+!" /* channel types */ diff --git a/src/plugins/irc/irc-ctcp.h b/src/plugins/irc/irc-ctcp.h index 0179f21ac..6fe8b6999 100644 --- a/src/plugins/irc/irc-ctcp.h +++ b/src/plugins/irc/irc-ctcp.h @@ -20,6 +20,8 @@ #ifndef WEECHAT_IRC_CTCP_H #define WEECHAT_IRC_CTCP_H 1 +#include <time.h> + struct t_irc_server; struct t_irc_channel; diff --git a/src/plugins/irc/irc-protocol.h b/src/plugins/irc/irc-protocol.h index f547ae272..a890fd866 100644 --- a/src/plugins/irc/irc-protocol.h +++ b/src/plugins/irc/irc-protocol.h @@ -20,6 +20,8 @@ #ifndef WEECHAT_IRC_PROTOCOL_H #define WEECHAT_IRC_PROTOCOL_H 1 +#include <time.h> + #define IRC_PROTOCOL_CALLBACK(__command) \ int \ irc_protocol_cb_##__command (struct t_irc_server *server, \ diff --git a/src/plugins/irc/irc-raw.h b/src/plugins/irc/irc-raw.h index 6f006b752..d0601a10c 100644 --- a/src/plugins/irc/irc-raw.h +++ b/src/plugins/irc/irc-raw.h @@ -20,6 +20,8 @@ #ifndef WEECHAT_IRC_RAW_H #define WEECHAT_IRC_RAW_H 1 +#include <time.h> + #define IRC_RAW_BUFFER_NAME "irc_raw" #define IRC_RAW_PREFIX_RECV "-->" diff --git a/src/plugins/irc/irc-redirect.h b/src/plugins/irc/irc-redirect.h index f05f55b00..3d3e09f9e 100644 --- a/src/plugins/irc/irc-redirect.h +++ b/src/plugins/irc/irc-redirect.h @@ -20,6 +20,8 @@ #ifndef WEECHAT_IRC_REDIRECT_H #define WEECHAT_IRC_REDIRECT_H 1 +#include <time.h> + #define IRC_REDIRECT_TIMEOUT_DEFAULT 60 struct t_irc_server; diff --git a/src/plugins/irc/irc-server.h b/src/plugins/irc/irc-server.h index e16b099cf..8d3db81fd 100644 --- a/src/plugins/irc/irc-server.h +++ b/src/plugins/irc/irc-server.h @@ -21,6 +21,7 @@ #ifndef WEECHAT_IRC_SERVER_H #define WEECHAT_IRC_SERVER_H 1 +#include <time.h> #include <sys/time.h> #include <regex.h> diff --git a/src/plugins/plugin-api.h b/src/plugins/plugin-api.h index 496d7e6d3..aab8c743c 100644 --- a/src/plugins/plugin-api.h +++ b/src/plugins/plugin-api.h @@ -20,6 +20,8 @@ #ifndef WEECHAT_PLUGIN_API_H #define WEECHAT_PLUGIN_API_H 1 +#include <time.h> + struct t_plugin_api_hdata { char *name; /* hdata name */ diff --git a/src/plugins/plugin-script-api.h b/src/plugins/plugin-script-api.h index ce6e2db48..f49614d1c 100644 --- a/src/plugins/plugin-script-api.h +++ b/src/plugins/plugin-script-api.h @@ -21,6 +21,8 @@ #ifndef WEECHAT_PLUGIN_SCRIPT_API_H #define WEECHAT_PLUGIN_SCRIPT_API_H 1 +#include <time.h> + extern void plugin_script_api_charset_set (struct t_plugin_script *script, const char *charset); extern struct t_config_file *plugin_script_api_config_new (struct t_weechat_plugin *weechat_plugin, diff --git a/src/plugins/relay/relay-client.h b/src/plugins/relay/relay-client.h index 92d271ab4..4634d7c7a 100644 --- a/src/plugins/relay/relay-client.h +++ b/src/plugins/relay/relay-client.h @@ -20,6 +20,8 @@ #ifndef WEECHAT_RELAY_CLIENT_H #define WEECHAT_RELAY_CLIENT_H 1 +#include <time.h> + #ifdef HAVE_GNUTLS #include <gnutls/gnutls.h> #endif /* HAVE_GNUTLS */ diff --git a/src/plugins/relay/relay-raw.h b/src/plugins/relay/relay-raw.h index 0c64c31c6..a2727d6c4 100644 --- a/src/plugins/relay/relay-raw.h +++ b/src/plugins/relay/relay-raw.h @@ -20,6 +20,8 @@ #ifndef WEECHAT_RELAY_RAW_H #define WEECHAT_RELAY_RAW_H 1 +#include <time.h> + #include "relay-client.h" #define RELAY_RAW_BUFFER_NAME "relay_raw" diff --git a/src/plugins/relay/relay-server.h b/src/plugins/relay/relay-server.h index b4fd3233c..826d0b160 100644 --- a/src/plugins/relay/relay-server.h +++ b/src/plugins/relay/relay-server.h @@ -20,6 +20,8 @@ #ifndef WEECHAT_RELAY_SERVER_H #define WEECHAT_RELAY_SERVER_H 1 +#include <time.h> + #ifdef HAVE_GNUTLS #define RELAY_SERVER_GNUTLS_DH_BITS 1024 #endif /* HAVE_GNUTLS */ diff --git a/src/plugins/relay/weechat/relay-weechat-msg.h b/src/plugins/relay/weechat/relay-weechat-msg.h index abd50038c..bb012ebe5 100644 --- a/src/plugins/relay/weechat/relay-weechat-msg.h +++ b/src/plugins/relay/weechat/relay-weechat-msg.h @@ -20,6 +20,8 @@ #ifndef WEECHAT_RELAY_WEECHAT_MSG_H #define WEECHAT_RELAY_WEECHAT_MSG_H 1 +#include <time.h> + struct t_relay_weechat_nicklist; #define RELAY_WEECHAT_MSG_INITIAL_ALLOC 4096 diff --git a/src/plugins/script/script-repo.h b/src/plugins/script/script-repo.h index 33d20ab85..555051020 100644 --- a/src/plugins/script/script-repo.h +++ b/src/plugins/script/script-repo.h @@ -20,6 +20,8 @@ #ifndef WEECHAT_SCRIPT_REPO_H #define WEECHAT_SCRIPT_REPO_H 1 +#include <time.h> + /* status for script */ #define SCRIPT_STATUS_INSTALLED 1 #define SCRIPT_STATUS_AUTOLOADED 2 diff --git a/src/plugins/trigger/trigger-callback.h b/src/plugins/trigger/trigger-callback.h index 0f7e2acd3..0af3c5ab6 100644 --- a/src/plugins/trigger/trigger-callback.h +++ b/src/plugins/trigger/trigger-callback.h @@ -20,6 +20,8 @@ #ifndef WEECHAT_TRIGGER_CALLBACK_H #define WEECHAT_TRIGGER_CALLBACK_H 1 +#include <time.h> + #define TRIGGER_CALLBACK_CB_INIT(__rc) \ struct t_trigger *trigger; \ struct t_hashtable *pointers, *extra_vars; \ diff --git a/src/plugins/weechat-plugin.h b/src/plugins/weechat-plugin.h index 57b2c09bf..70f1c9b58 100644 --- a/src/plugins/weechat-plugin.h +++ b/src/plugins/weechat-plugin.h @@ -26,6 +26,7 @@ extern "C" { #endif /* __cplusplus */ +#include <time.h> #include <sys/types.h> #include <sys/socket.h> diff --git a/src/plugins/xfer/xfer.h b/src/plugins/xfer/xfer.h index fff18e12f..cf5c3147b 100644 --- a/src/plugins/xfer/xfer.h +++ b/src/plugins/xfer/xfer.h @@ -21,7 +21,9 @@ #define WEECHAT_XFER_H 1 #include <unistd.h> +#include <time.h> #include <gcrypt.h> +#include <sys/socket.h> #define weechat_plugin weechat_xfer_plugin #define XFER_PLUGIN_NAME "xfer" diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 68db806ba..cffec7ffb 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -42,6 +42,13 @@ set(LIB_WEECHAT_UNIT_TESTS_SRC ) add_library(weechat_unit_tests STATIC ${LIB_WEECHAT_UNIT_TESTS_SRC}) +if(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") + list(APPEND EXTRA_LIBS "intl") + if(HAVE_BACKTRACE) + list(APPEND EXTRA_LIBS "execinfo") + endif() +endif() + # binary to run tests set(WEECHAT_TESTS_SRC tests.cpp tests.h) add_executable(tests ${WEECHAT_TESTS_SRC}) |