From 7c23f56a4d08f33becca50df67c51d1d5b6793e2 Mon Sep 17 00:00:00 2001 From: Jakub Zawadzki Date: Fri, 15 Sep 2017 07:35:59 +0200 Subject: Fix compilation errors when configured --without-plugins and without lua. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit filesystem.c: In function ‘init_plugin_pers_dir’: filesystem.c:1041:5: error: ‘plugin_pers_dir’ undeclared (first use in this function) plugin_pers_dir = get_persconffile_path(PLUGINS_DIR_NAME, FALSE); ^~~~~~~~~~~~~~~ filesystem.c:1041:5: note: each undeclared identifier is reported only once for each function it appears in filesystem.c: In function ‘get_plugins_pers_dir’: filesystem.c:1062:10: error: ‘plugin_pers_dir’ undeclared (first use in this function) if (!plugin_pers_dir) ^~~~~~~~~~~~~~~ Change-Id: I9ace17da42665d135b9432b1f19970491589e3bf Reviewed-on: https://code.wireshark.org/review/23545 Petri-Dish: Jakub Zawadzki Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde Reviewed-by: Michael Mann --- wsutil/filesystem.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'wsutil/filesystem.c') diff --git a/wsutil/filesystem.c b/wsutil/filesystem.c index 2a2c4bab5f..a4e5ff075f 100644 --- a/wsutil/filesystem.c +++ b/wsutil/filesystem.c @@ -1033,7 +1033,6 @@ init_plugin_dir(void) } #endif } -#endif /* HAVE_PLUGINS || HAVE_LUA */ static void init_plugin_pers_dir(void) @@ -1041,6 +1040,8 @@ init_plugin_pers_dir(void) plugin_pers_dir = get_persconffile_path(PLUGINS_DIR_NAME, FALSE); } +#endif /* HAVE_PLUGINS || HAVE_LUA */ + /* * Get the directory in which the plugins are stored. */ @@ -1059,9 +1060,13 @@ get_plugin_dir(void) const char * get_plugins_pers_dir(void) { +#if defined(HAVE_PLUGINS) || defined(HAVE_LUA) if (!plugin_pers_dir) init_plugin_pers_dir(); return plugin_pers_dir; +#else + return NULL; +#endif } #if defined(HAVE_EXTCAP) -- cgit v1.2.3