This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

C++ compile fix for queue.h


The queue.h header file would cause a c++ compile to fail because the
was no cast when assigning a void* to an explicit type.

Note, the same changes could presumably be made to the NetBSD stack.

Scott

Index: net/bsd_tcpip/current/ChangeLog
===================================================================
RCS file: /home/cvs/ecos/packages/net/bsd_tcpip/current/ChangeLog,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 ChangeLog
--- net/bsd_tcpip/current/ChangeLog	14 May 2003 17:50:09 -0000	1.1.1.1
+++ net/bsd_tcpip/current/ChangeLog	20 May 2003 00:04:20 -0000
@@ -1,3 +1,7 @@
+2003-05-19  Scott Wilkinson <scott@alliantnetworks.com>
+
+	* include/sys/queue.h:  Casting to avoid c++ compile errors.
+
 2003-05-12  Motoya Kurotsu  <kurotsu@allied-telesis.co.jp>
 
 	* src/ecos/timeout.c (do_timeout): The head of the linked list of
Index: net/bsd_tcpip/current/include/sys/queue.h
===================================================================
RCS file: /home/cvs/ecos/packages/net/bsd_tcpip/current/include/sys/queue.h,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 queue.h
--- net/bsd_tcpip/current/include/sys/queue.h	14 May 2003 17:50:11 -0000	1.1.1.1
+++ net/bsd_tcpip/current/include/sys/queue.h	20 May 2003 00:04:20 -0000
@@ -535,7 +535,7 @@
 static __inline void
 insque(void *a, void *b)
 {
-	struct quehead *element = a, *head = b;
+	struct quehead *element = (struct quehead *)a, *head = (struct quehead *)b;
 
 	element->qh_link = head->qh_link;
 	element->qh_rlink = head;
@@ -546,7 +546,7 @@
 static __inline void
 remque(void *a)
 {
-	struct quehead *element = a;
+	struct quehead *element = (struct quehead *)a;
 
 	element->qh_link->qh_rlink = element->qh_rlink;
 	element->qh_rlink->qh_link = element->qh_link;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]