Skip to content

Commit

Permalink
fix include to find SIOCGSTAMP with latest kernel
Browse files Browse the repository at this point in the history
In linux kernel commit 0768e17073dc527ccd18ed5f96ce85f9985e9115
the asm-generic/sockios.h header no longer defines SIOCGSTAMP.
Instead it provides only SIOCGSTAMP_OLD.

The linux/sockios.h header now defines SIOCGSTAMP using either
SIOCGSTAMP_OLD or SIOCGSTAMP_NEW as appropriate. This linux only
header file is not pulled so we get a build failure.

canlogserver.c: In function 'main':
canlogserver.c:404:21: error: 'SIOCGSTAMP' undeclared (first use in this function); did you mean 'SIOCGRARP'?
     if (ioctl(s[i], SIOCGSTAMP, &tv) < 0)
                     ^~~~~~~~~~
                     SIOCGRARP
canlogserver.c:404:21: note: each undeclared identifier is reported only once for each function it appears in

Fixes:
 - http://autobuild.buildroot.org/results/363de7d9bf433be8bc47ba4ee52ae0bb80fa9021

Signed-off-by: Fabrice Fontaine <[email protected]>
  • Loading branch information
ffontaine committed Jul 14, 2019

Verified

This commit was signed with the committer’s verified signature.
eitoball Eito Katagiri
1 parent 9ffb164 commit e9590b1
Showing 6 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions canlogserver.c
Original file line number Diff line number Diff line change
@@ -62,6 +62,7 @@

#include <linux/can.h>
#include <linux/can/raw.h>
#include <linux/sockios.h>
#include <signal.h>
#include <errno.h>

1 change: 1 addition & 0 deletions cansniffer.c
Original file line number Diff line number Diff line change
@@ -62,6 +62,7 @@

#include <linux/can.h>
#include <linux/can/bcm.h>
#include <linux/sockios.h>

#include "terminal.h"

1 change: 1 addition & 0 deletions isotpdump.c
Original file line number Diff line number Diff line change
@@ -57,6 +57,7 @@

#include <linux/can.h>
#include <linux/can/raw.h>
#include <linux/sockios.h>
#include "terminal.h"

#define NO_CAN_ID 0xFFFFFFFFU
1 change: 1 addition & 0 deletions isotpperf.c
Original file line number Diff line number Diff line change
@@ -57,6 +57,7 @@

#include <linux/can.h>
#include <linux/can/raw.h>
#include <linux/sockios.h>

#define NO_CAN_ID 0xFFFFFFFFU
#define PERCENTRES 2 /* resolution in percent for bargraph */
1 change: 1 addition & 0 deletions isotpsniffer.c
Original file line number Diff line number Diff line change
@@ -56,6 +56,7 @@

#include <linux/can.h>
#include <linux/can/isotp.h>
#include <linux/sockios.h>
#include "terminal.h"

#define NO_CAN_ID 0xFFFFFFFFU
1 change: 1 addition & 0 deletions slcanpty.c
Original file line number Diff line number Diff line change
@@ -37,6 +37,7 @@

#include <linux/can.h>
#include <linux/can/raw.h>
#include <linux/sockios.h>

/* maximum rx buffer len: extended CAN frame with timestamp */
#define SLC_MTU (sizeof("T1111222281122334455667788EA5F\r")+1)

0 comments on commit e9590b1

Please sign in to comment.