[rtems-libbsd commit] Use MIPS in_cksum.c for SPARC

Sebastian Huber sebh at rtems.org
Tue Apr 17 14:58:41 UTC 2012


Module:    rtems-libbsd
Branch:    master
Commit:    68df6075afeb6c4d8f04562b977f9162f71b8869
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=68df6075afeb6c4d8f04562b977f9162f71b8869

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Apr 17 16:07:34 2012 +0200

Use MIPS in_cksum.c for SPARC

---

 Makefile                     |    2 +-
 freebsd-to-rtems.py          |    2 +-
 freebsd/mips/mips/in_cksum.c |    5 +++++
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 27d2a22..177f30e 100644
--- a/Makefile
+++ b/Makefile
@@ -411,7 +411,7 @@ ifeq ($(RTEMS_CPU), powerpc)
 C_FILES += freebsd/powerpc/powerpc/in_cksum.c
 endif
 ifeq ($(RTEMS_CPU), sparc)
-C_FILES += freebsd/netinet/in_cksum.c
+C_FILES += freebsd/mips/mips/in_cksum.c
 endif
 ifeq ($(RTEMS_CPU), sparc64)
 C_FILES += freebsd/sparc64/sparc64/in_cksum.c
diff --git a/freebsd-to-rtems.py b/freebsd-to-rtems.py
index d440605..803b273 100755
--- a/freebsd-to-rtems.py
+++ b/freebsd-to-rtems.py
@@ -2006,7 +2006,7 @@ in_cksum.addCPUDependentSourceFiles(
 in_cksum.addCPUDependentSourceFiles(
 	'sparc',
 	[
-		'netinet/in_cksum.c',
+		'mips/mips/in_cksum.c',
 	]
 )
 in_cksum.addCPUDependentSourceFiles(
diff --git a/freebsd/mips/mips/in_cksum.c b/freebsd/mips/mips/in_cksum.c
index b4a12df..a519c72 100644
--- a/freebsd/mips/mips/in_cksum.c
+++ b/freebsd/mips/mips/in_cksum.c
@@ -187,7 +187,12 @@ in_addword(u_short a, u_short b)
 }
 
 u_short
+#ifdef __rtems__
+/* Prototype does not match in FreeBSD code */
+in_pseudo(u_int a, u_int b, u_int c)
+#else
 in_pseudo(u_int32_t a, u_int32_t b, u_int32_t c)
+#endif
 {
 	u_int64_t sum;
 	union q_util q_util;




More information about the vc mailing list