erlsnoop patch
per@REDACTED
per@REDACTED
Sun Nov 11 21:23:00 CET 2001
Hi Gordon,
Thanks for erlsnoop, funky stuff.
Attached is a small patch to build without warnings under RH 7.1 / gcc
3.0.2.
Use "patch -p1 <erlsnoop-per.patch" to apply it.
Included is also a fix to the ^C problem.
/Per
-------------- next part --------------
--- erlsnoop-1.0/erlang.c Thu Aug 2 08:11:12 2001
+++ erlsnoop-1.0.per/erlang.c Sun Nov 11 20:27:02 2001
@@ -249,7 +249,7 @@
void show_it_now(int type, pinfo_t *pkt, const void *p, int len, int *index)
{
if (conf->show_timestamps) {
- show_time(&pkt->ph.ts);
+ show_time((struct timeval *)&pkt->ph.ts);
}
show_sr(stream,len);
--- erlsnoop-1.0/erlsnoop.c Mon Oct 29 16:22:30 2001
+++ erlsnoop-1.0.per/erlsnoop.c Sun Nov 11 20:48:45 2001
@@ -215,6 +215,7 @@
static void cancel(int signo)
{
fprintf(conf->out,"\n");
+ pcap_close(conf->pcap);
done = 1;
}
--- erlsnoop-1.0/ip.c Wed Aug 1 17:46:33 2001
+++ erlsnoop-1.0.per/ip.c Sun Nov 11 20:54:53 2001
@@ -74,6 +74,8 @@
#endif
default:
+ break;
+
}
return 0;
--- erlsnoop-1.0/Makefile Mon Oct 29 15:53:07 2001
+++ erlsnoop-1.0.per/Makefile Sun Nov 11 20:24:13 2001
@@ -1,5 +1,5 @@
CC=gcc
-CFLAGS=-O2 -Wall -ggdb
+CFLAGS=-O2 -Wall -ggdb -I/usr/include/pcap
OSNAME=$(shell uname -s)
--- erlsnoop-1.0/utils.c Mon Oct 29 16:18:12 2001
+++ erlsnoop-1.0.per/utils.c Sun Nov 11 20:55:46 2001
@@ -11,6 +11,10 @@
#include <sys/sockio.h>
#endif
+#ifdef LINUX
+#include <time.h>
+#endif
+
#include <net/if.h>
#include "erlsnoop.h"
More information about the erlang-questions
mailing list