[rtems-libbsd commit] freebsd: Use constant ipv6 addresses from vars.c.

Sebastian Huber sebh at rtems.org
Fri Aug 5 06:38:18 UTC 2016


Module:    rtems-libbsd
Branch:    4.11
Commit:    19e8a6455d7fe7639bbc82820bf5d779de186d25
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=19e8a6455d7fe7639bbc82820bf5d779de186d25

Author:    Christian Mauderer <Christian.Mauderer at embedded-brains.de>
Date:      Thu Aug  4 14:12:17 2016 +0200

freebsd: Use constant ipv6 addresses from vars.c.

---

 freebsd/lib/libc/net/vars.c | 2 ++
 freebsd/sys/netinet6/in6.c  | 2 ++
 libbsd.py                   | 1 +
 wscript                     | 1 +
 4 files changed, 6 insertions(+)

diff --git a/freebsd/lib/libc/net/vars.c b/freebsd/lib/libc/net/vars.c
index 22136cd..088f679 100644
--- a/freebsd/lib/libc/net/vars.c
+++ b/freebsd/lib/libc/net/vars.c
@@ -1,3 +1,5 @@
+#include <machine/rtems-bsd-user-space.h>
+
 /*	$KAME: vars.c,v 1.2 2001/08/20 02:32:41 itojun Exp $	*/
 
 /*
diff --git a/freebsd/sys/netinet6/in6.c b/freebsd/sys/netinet6/in6.c
index 8dc4d29..d47161e 100644
--- a/freebsd/sys/netinet6/in6.c
+++ b/freebsd/sys/netinet6/in6.c
@@ -113,12 +113,14 @@ VNET_DECLARE(int, icmp6_nodeinfo_oldmcprefix);
 /*
  * Definitions of some costant IP6 addresses.
  */
+#ifndef __rtems__
 const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT;
 const struct in6_addr in6addr_loopback = IN6ADDR_LOOPBACK_INIT;
 const struct in6_addr in6addr_nodelocal_allnodes =
 	IN6ADDR_NODELOCAL_ALLNODES_INIT;
 const struct in6_addr in6addr_linklocal_allnodes =
 	IN6ADDR_LINKLOCAL_ALLNODES_INIT;
+#endif /* __rtems__ */
 const struct in6_addr in6addr_linklocal_allrouters =
 	IN6ADDR_LINKLOCAL_ALLROUTERS_INIT;
 const struct in6_addr in6addr_linklocal_allv2routers =
diff --git a/libbsd.py b/libbsd.py
index f32cfe8..bbdd6bf 100755
--- a/libbsd.py
+++ b/libbsd.py
@@ -1978,6 +1978,7 @@ def user_space(mm):
             'lib/libc/net/recv.c',
             'lib/libc/net/rthdr.c',
             'lib/libc/net/send.c',
+            'lib/libc/net/vars.c',
             'lib/libc/posix1e/mac.c',
             'lib/libc/resolv/h_errno.c',
             'lib/libc/resolv/herror.c',
diff --git a/wscript b/wscript
index 9576815..c456d0c 100644
--- a/wscript
+++ b/wscript
@@ -314,6 +314,7 @@ def build(bld):
                      'freebsd/lib/libc/net/recv.c',
                      'freebsd/lib/libc/net/rthdr.c',
                      'freebsd/lib/libc/net/send.c',
+                     'freebsd/lib/libc/net/vars.c',
                      'freebsd/lib/libc/posix1e/mac.c',
                      'freebsd/lib/libc/resolv/h_errno.c',
                      'freebsd/lib/libc/resolv/herror.c',




More information about the vc mailing list