[rtems-libbsd commit] Fix linker errors with minimal build set

Sebastian Huber sebh at rtems.org
Wed Jul 8 08:23:01 UTC 2020


Module:    rtems-libbsd
Branch:    5-freebsd-12
Commit:    26866d2c1f2432b25b5db71995bce2035187c715
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=26866d2c1f2432b25b5db71995bce2035187c715

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Jul  8 10:21:20 2020 +0200

Fix linker errors with minimal build set

---

 rtemsbsd/rtems/rtems-bsd-init-dhcp.c                    | 5 +++++
 testsuite/include/rtems/bsd/test/default-network-init.h | 4 ++++
 2 files changed, 9 insertions(+)

diff --git a/rtemsbsd/rtems/rtems-bsd-init-dhcp.c b/rtemsbsd/rtems/rtems-bsd-init-dhcp.c
index e0a298f..d91f439 100644
--- a/rtemsbsd/rtems/rtems-bsd-init-dhcp.c
+++ b/rtemsbsd/rtems/rtems-bsd-init-dhcp.c
@@ -38,6 +38,7 @@
  */
 
 #include <rtems/bsd/bsd.h>
+#include <rtems/bsd/modules.h>
 #include <rtems/dhcpcd.h>
 
 #include <sysexits.h>
@@ -76,7 +77,11 @@ rtems_bsd_initialize_dhcp(void)
 
 #define RTEMS_BSD_CONFIG_NET_PF_UNIX
 #define RTEMS_BSD_CONFIG_NET_IP_MROUTE
+
+#ifdef RTEMS_BSD_MODULE_NETINET6
 #define RTEMS_BSD_CONFIG_NET_IP6_MROUTE
+#endif
+
 #define RTEMS_BSD_CONFIG_NET_IF_BRIDGE
 #define RTEMS_BSD_CONFIG_NET_IF_LAGG
 #define RTEMS_BSD_CONFIG_NET_IF_VLAN
diff --git a/testsuite/include/rtems/bsd/test/default-network-init.h b/testsuite/include/rtems/bsd/test/default-network-init.h
index b48240c..02cdd33 100644
--- a/testsuite/include/rtems/bsd/test/default-network-init.h
+++ b/testsuite/include/rtems/bsd/test/default-network-init.h
@@ -255,7 +255,11 @@ Init(rtems_task_argument arg)
 
 #define RTEMS_BSD_CONFIG_NET_PF_UNIX
 #define RTEMS_BSD_CONFIG_NET_IP_MROUTE
+
+#ifdef RTEMS_BSD_MODULE_NETINET6
 #define RTEMS_BSD_CONFIG_NET_IP6_MROUTE
+#endif
+
 #define RTEMS_BSD_CONFIG_NET_IF_BRIDGE
 #define RTEMS_BSD_CONFIG_NET_IF_LAGG
 #define RTEMS_BSD_CONFIG_NET_IF_VLAN



More information about the vc mailing list