Skip to content

Commit

Permalink
can-utils: cleanup headers
Browse files Browse the repository at this point in the history
- add missing sys/socket.h: on some systems (like Android)
have SOCK_RAW definition directly in sys/socket.h

- use sys/wait.h instead if wait.h

- include termios.h explicitly (Android)

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
  • Loading branch information
yegorich authored and marckleinebudde committed Mar 20, 2012
1 parent 5077515 commit 4d3a002
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion canlogserver.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
#include <time.h>

#include <sys/time.h>
#include <sys/wait.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
Expand All @@ -65,7 +66,6 @@
#include <linux/can.h>
#include <linux/can/raw.h>
#include <signal.h>
#include <wait.h>
#include <errno.h>

#include "lib.h"
Expand Down
1 change: 1 addition & 0 deletions canplayer.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
#include <unistd.h>

#include <net/if.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <sys/time.h>
#include <linux/can.h>
Expand Down
1 change: 1 addition & 0 deletions cansend.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@

#include <net/if.h>
#include <sys/ioctl.h>
#include <sys/socket.h>

#include <linux/can.h>
#include <linux/can/raw.h>
Expand Down
2 changes: 2 additions & 0 deletions slcan_attach.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@
#include <fcntl.h>
#include <unistd.h>
#include <getopt.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <net/if.h>
#include <termios.h>

#define LDISC_N_SLCAN 17 /* default slcan line discipline since Kernel 2.6.25 */

Expand Down
5 changes: 3 additions & 2 deletions slcand.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,15 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <syslog.h>
#include <errno.h>
#include <pwd.h>
#include <signal.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <net/if.h>

/* default slcan line discipline since Kernel 2.6.25 */
Expand Down
1 change: 1 addition & 0 deletions slcanpty.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <termios.h>

#include <net/if.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/types.h>
Expand Down

0 comments on commit 4d3a002

Please sign in to comment.