aboutsummaryrefslogtreecommitdiffstats
path: root/editcap.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2013-03-07 17:20:12 +0000
committerGerald Combs <gerald@wireshark.org>2013-03-07 17:20:12 +0000
commit29ceca1b26e3507105f8038eb5cd5ca6bb4871cc (patch)
tree0a094cc58d06b707af3e06662b9e7175df613033 /editcap.c
parenta196e90c3b3f0b0aeccc008208e2dcb91293baa3 (diff)
From Balint:
[PATCH 1/2] Revert "Try to fix the "LNK4217: locally defined symbol" warnings. This reverts commit r48158. [PATCH 2/2] Employ small hack in editcap to link with a few objects from libwireshark properly From me: Add the ability to reset symbol exports via ws_symbol_export.h's include guard and do so in capinfos.c and editcap.c. We include ws_symbol_export.h in over 200 files so it didn't seem to make sense to remove its include guard entirely. svn path=/trunk/; revision=48170
Diffstat (limited to 'editcap.c')
-rw-r--r--editcap.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/editcap.c b/editcap.c
index 5331d0f897..2d4b18ef5e 100644
--- a/editcap.c
+++ b/editcap.c
@@ -52,8 +52,6 @@
#include <unistd.h>
#endif
-
-
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
@@ -77,12 +75,23 @@
# include "wsutil/strptime.h"
#endif
+#include <wsutil/privileges.h>
+
+/*
+ * The symbols declared in the below are exported from libwireshark,
+ * but we don't want to link whole libwireshark to editcap.
+ * We link the object directly instead and this needs a little trick
+ * with the WS_BUILD_DLL #define.
+ */
+#define WS_BUILD_DLL
+#define RESET_SYMBOL_EXPORT /* wsutil/wsgetopt.h set export behavior above. */
#include "epan/crypt/md5.h"
#include "epan/plugins.h"
#include "epan/report_err.h"
#include "epan/filesystem.h"
-#include <wsutil/privileges.h>
#include "epan/nstime.h"
+#undef WS_BUILD_DLL
+#define RESET_SYMBOL_EXPORT
#include "svnversion.h"