summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2012-04-17 14:07:34 (UTC)
committerSebastian Huber <sebastian.huber@embedded-brains.de>2012-04-17 15:01:17 (UTC)
commit68df6075afeb6c4d8f04562b977f9162f71b8869 (patch)
tree779084303e997d3ae703e66e8da998f2b5273b28
parentc57eebba90f8861dd020b788b139d754ee42a80a (diff)
downloadrtems-libbsd-68df6075afeb6c4d8f04562b977f9162f71b8869.tar.bz2
Use MIPS in_cksum.c for SPARC
-rw-r--r--Makefile2
-rwxr-xr-xfreebsd-to-rtems.py2
-rw-r--r--freebsd/mips/mips/in_cksum.c5
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;