Hello all,
lwres-plugin does not compile on windows.
The attached patch fixes both the makefile and the sourcefile.
the makefile should use cflags as the makefiles from other plugins do and
should also link the plugin against $(GLIB_LIBS)
In packet-lwres.c function ip_to_str() collides with ip_to_str() from
epan/to_str.c . The functions are identical! the function in packet-lwres.c should
be removed.
Regards,
Lars Roland
Index: ethereal/plugins/lwres/Makefile.nmake
===================================================================
RCS file: /cvsroot/ethereal/plugins/lwres/Makefile.nmake,v
retrieving revision 1.1
diff -u -r1.1 Makefile.nmake
--- ethereal/plugins/lwres/Makefile.nmake 5 Aug 2003 05:03:30 -0000 1.1
+++ ethereal/plugins/lwres/Makefile.nmake 5 Aug 2003 14:39:16 -0000
@@ -6,16 +6,14 @@
############### no need to modify below this line #########
-CFLAGS=/DHAVE_CONFIG_H /I../.. /I../../wiretap \
- /I$(GLIB_DIR) /I$(GTK_DIR) /I$(GLIB_DIR)/gmodule \
- /I$(GTK_DIR)\gdk /I$(GTK_DIR)\gdk\win32 \
+CFLAGS=/DHAVE_CONFIG_H /I../.. /I../../wiretap $(GLIB_CFLAGS) \
/I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)
OBJECTS=packet-lwres.obj
lwres.dll lwres.exp lwres.lib : packet-lwres.obj ..\plugin_api.obj
link -dll /out:lwres.dll packet-lwres.obj ..\plugin_api.obj \
- $(GLIB_DIR)\glib-$(GLIB_VERSION).lib
+ $(GLIB_LIBS)
clean:
rm -f $(OBJECTS) lwres.dll lwres.exp lwres.lib $(PDB_FILE)
Index: ethereal/plugins/lwres/packet-lwres.c
===================================================================
RCS file: /cvsroot/ethereal/plugins/lwres/packet-lwres.c,v
retrieving revision 1.1
diff -u -r1.1 packet-lwres.c
--- ethereal/plugins/lwres/packet-lwres.c 5 Aug 2003 05:03:30 -0000 1.1
+++ ethereal/plugins/lwres/packet-lwres.c 5 Aug 2003 14:39:19 -0000
@@ -244,24 +244,6 @@
*p = '\0';
}
-gchar *
-ip_to_str(const guint8 *ad) {
- static gchar str[4][16];
- static gchar *cur;
-
- if (cur == &str[0][0]) {
- cur = &str[1][0];
- } else if (cur == &str[1][0]) {
- cur = &str[2][0];
- } else if (cur == &str[2][0]) {
- cur = &str[3][0];
- } else {
- cur = &str[0][0];
- }
- ip_to_str_buf(ad, cur);
- return cur;
-}
-
int
get_dns_name(tvbuff_t *tvb, int offset, int dns_data_offset,