]> rtime.felk.cvut.cz Git - can-utils.git/commitdiff
include: can.h: add typedef for __kernel_sa_family_t to make headers self-contained
authorMarc Kleine-Budde <mkl@pengutronix.de>
Tue, 21 Jan 2014 11:49:54 +0000 (12:49 +0100)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Thu, 23 Jan 2014 12:57:29 +0000 (13:57 +0100)
This patch adds the typedef for __kernel_sa_family_t that was introduced in
Linux v3.1-rc2 (commit 6602a4b net: Make userland include of netlink.h more sane)
in <linux/socket.h>. It must be duplicated here to make the CAN headers
self-contained.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
include/linux/can.h

index 5802cb382c65f4d105e5dbcb54d7cd9a772ca075..c44a33147eef64a834f87c8eb86554a9d232d957 100644 (file)
@@ -122,8 +122,13 @@ struct canfd_frame {
 
 #define SOL_CAN_BASE 100
 
-// typedef unsigned short __kernel_sa_family_t;
-// introduced in Linux 3.2 commit 6602a4baf4d1a73cc4685a39ef859e1c5ddf654c
+/*
+ * This typedef was introduced in Linux v3.1-rc2
+ * (commit 6602a4b net: Make userland include of netlink.h more sane)
+ * in <linux/socket.h>. It must be duplicated here to make the CAN
+ * headers self-contained.
+ */
+typedef unsigned short __kernel_sa_family_t;
 
 /**
  * struct sockaddr_can - the sockaddr structure for CAN sockets
@@ -132,8 +137,7 @@ struct canfd_frame {
  * @can_addr:    protocol specific address information
  */
 struct sockaddr_can {
-       sa_family_t can_family;
-//     __kernel_sa_family_t can_family;
+       __kernel_sa_family_t can_family;
        int         can_ifindex;
        union {
                /* transport protocol class address information (e.g. ISOTP) */