changed user space programs to use new include files.

added missing include file <net/if.h> in most programs.
added volatile modifier to "int running" in candump.c.
pull/7/head
Urs Thuermann 2006-10-24 13:55:43 +00:00
parent cee2fc2fd0
commit 063c62c665
3 changed files with 11 additions and 6 deletions

View File

@ -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

View File

@ -62,9 +62,11 @@
#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)

View File

@ -60,9 +60,11 @@
#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)
{