Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netcan Needs <sys/types.h> not <machine/int_types.h>
details: https://anonhg.NetBSD.org/src/rev/4f7a249d5f9c
branches: trunk
changeset: 353970:4f7a249d5f9c
user: bouyer <bouyer%NetBSD.org@localhost>
date: Tue May 30 13:30:51 2017 +0000
description:
Needs <sys/types.h> not <machine/int_types.h>
diffstat:
sys/netcan/can.h | 4 ++--
sys/netcan/can_pcb.c | 9 ++++++---
2 files changed, 8 insertions(+), 5 deletions(-)
diffs (48 lines):
diff -r a324635560cb -r 4f7a249d5f9c sys/netcan/can.h
--- a/sys/netcan/can.h Tue May 30 10:27:53 2017 +0000
+++ b/sys/netcan/can.h Tue May 30 13:30:51 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: can.h,v 1.2 2017/05/27 21:02:56 bouyer Exp $ */
+/* $NetBSD: can.h,v 1.3 2017/05/30 13:30:51 bouyer Exp $ */
/*-
* Copyright (c) 2003, 2017 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
#define _NETCAN_CAN_H
#include <sys/featuretest.h>
-#include <machine/int_types.h>
+#include <sys/types.h>
/* Definitions compatible (as much as possible) with socketCAN */
diff -r a324635560cb -r 4f7a249d5f9c sys/netcan/can_pcb.c
--- a/sys/netcan/can_pcb.c Tue May 30 10:27:53 2017 +0000
+++ b/sys/netcan/can_pcb.c Tue May 30 13:30:51 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: can_pcb.c,v 1.2 2017/05/27 21:02:56 bouyer Exp $ */
+/* $NetBSD: can_pcb.c,v 1.3 2017/05/30 13:30:51 bouyer Exp $ */
/*-
* Copyright (c) 2003, 2017 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: can_pcb.c,v 1.2 2017/05/27 21:02:56 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: can_pcb.c,v 1.3 2017/05/30 13:30:51 bouyer Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -223,7 +223,10 @@
memset(scan, 0, sizeof (*scan));
scan->can_family = AF_CAN;
scan->can_len = sizeof(*scan);
- scan->can_ifindex = canp->canp_ifp->if_index;
+ if (canp->canp_ifp)
+ scan->can_ifindex = canp->canp_ifp->if_index;
+ else
+ scan->can_ifindex = 0;
mutex_exit(&canp->canp_mtx);
}
Home |
Main Index |
Thread Index |
Old Index