]> rtime.felk.cvut.cz Git - can-utils.git/commitdiff
changed user space programs to use new include files.
authorUrs Thuermann <urs.thuermann@volkswagen.de>
Tue, 24 Oct 2006 13:55:43 +0000 (13:55 +0000)
committerUrs Thuermann <urs.thuermann@volkswagen.de>
Tue, 24 Oct 2006 13:55:43 +0000 (13:55 +0000)
added missing include file <net/if.h> in most programs.
added volatile modifier to "int running" in candump.c.

Makefile
can-sniffer.c
candump.c

index 47071540285e3cb8537bd3220bab3a58a7458240..f7c5153e8e5b3eb67ad4d125af593e3a9ff225f0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -40,7 +40,8 @@
 #
 #  Send feedback to <socketcan-users@lists.berlios.de>
 
-CFLAGS    = -O2 -Wall -Wno-parentheses -I../kernel/2.4/can -fno-strict-aliasing
+CFLAGS    = -O2 -Wall -Wno-parentheses -I../kernel/2.6/include \
+           -fno-strict-aliasing
 
 PROGRAMS = candump can-sniffer
 
index d40f48c4e94fc85cfbfd93d0db3a78f719969c18..7479ea35bcfcf286208d9a5ae9139e0857280eee 100644 (file)
 #include <sys/socket.h>
 #include <sys/ioctl.h>
 #include <sys/uio.h>
+#include <net/if.h>
+
+#include <linux/can.h>
+#include <linux/can/bcm.h>
 
-#include "af_can.h"
-#include "bcm.h"
 #include "terminal.h"
 
 #define U64_DATA(p) (*(unsigned long long*)(p)->data)
index aefa02a9f90a900dbcf67f5b96fd9cc114fb9ee6..a680d2a52e5f9ab22da3d4a926cd8bdb0c38debf 100644 (file)
--- a/candump.c
+++ b/candump.c
 #include <sys/socket.h>
 #include <sys/ioctl.h>
 #include <sys/uio.h>
+#include <net/if.h>
+
+#include <linux/can.h>
+#include <linux/can/raw.h>
 
-#include "af_can.h"
-#include "raw.h"
 #include "terminal.h"
 
 #define USE_RECVFROM /* use read() or recvfrom() syscall */
@@ -87,7 +89,7 @@ const char anichar[MAXANI] = {'|', '/', '-', '\\', '|', '/', '-', '\\'};
 
 extern int optind, opterr, optopt;
 
-static int     running = 1;
+static volatile int running = 1;
 
 void print_usage(char *prg)
 {