From 338f3005fc420b2c26f597ae6c0754f391c9fcca Mon Sep 17 00:00:00 2001 From: Christian Mauderer Date: Wed, 25 Apr 2018 16:28:00 +0200 Subject: buildset: Add minimal and everything config. This adds two new buildset configurations: One that leaves out as much features as possible and one that enables all features. For the default configuration WiFi support is now disabled. To disable IPv6 for the minimal configuration, all -DINET6 are eliminated in libbsd.py. They are now replaced by a #ifdef that checks for RTEMS_BSD_MODULE_NETINET6 instead. Close #3351. --- dhcpcd/config.h | 1 + dhcpcd/dhcp6.c | 5 +++++ dhcpcd/ipv6.c | 5 +++++ dhcpcd/ipv6.h | 3 +++ dhcpcd/ipv6nd.c | 5 +++++ dhcpcd/platform.h | 3 +++ 6 files changed, 22 insertions(+) (limited to 'dhcpcd') diff --git a/dhcpcd/config.h b/dhcpcd/config.h index 27174eb8..cf6c5fb1 100644 --- a/dhcpcd/config.h +++ b/dhcpcd/config.h @@ -14,6 +14,7 @@ #include #include #include "compat/pollts.h" +#include uint32_t arc4random(void); static inline int dhcpcd_flock(int a, int b) { return -1; } #define flock(a, b) dhcpcd_flock(a, b) diff --git a/dhcpcd/dhcp6.c b/dhcpcd/dhcp6.c index ec585883..d775e312 100644 --- a/dhcpcd/dhcp6.c +++ b/dhcpcd/dhcp6.c @@ -27,6 +27,10 @@ /* TODO: We should decline dupliate addresses detected */ +#ifdef __rtems__ +#include +#endif /* __rtems__ */ +#if defined(__rtems__) && defined(INET6) #include #include @@ -2809,3 +2813,4 @@ dhcp6_env(char **env, const char *prefix, const struct interface *ifp, return n; } +#endif /* defined(__rtems__) && defined(INET6) */ diff --git a/dhcpcd/ipv6.c b/dhcpcd/ipv6.c index 3f3a1033..c6d69d27 100644 --- a/dhcpcd/ipv6.c +++ b/dhcpcd/ipv6.c @@ -25,6 +25,10 @@ * SUCH DAMAGE. */ +#ifdef __rtems__ +#include +#endif /* __rtems__ */ +#if defined(__rtems__) && defined(INET6) #include #include #include @@ -1045,3 +1049,4 @@ ipv6_buildroutes(void) free(routes); routes = nrs; } +#endif /* defined(__rtems__) && defined(INET6) */ diff --git a/dhcpcd/ipv6.h b/dhcpcd/ipv6.h index 6b5dc1df..7ba9425d 100644 --- a/dhcpcd/ipv6.h +++ b/dhcpcd/ipv6.h @@ -31,6 +31,9 @@ #include #include +#ifdef __rtems__ +#include +#endif /* __rtems__ */ #define ALLROUTERS "ff02::2" #define HOPLIMIT 255 diff --git a/dhcpcd/ipv6nd.c b/dhcpcd/ipv6nd.c index 2fd20842..5709ed19 100644 --- a/dhcpcd/ipv6nd.c +++ b/dhcpcd/ipv6nd.c @@ -25,6 +25,10 @@ * SUCH DAMAGE. */ +#ifdef __rtems__ +#include +#endif /* __rtems__ */ +#if defined(__rtems__) && defined(INET6) #include #include #include @@ -1833,3 +1837,4 @@ ipv6nd_startrs(struct interface *ifp) ipv6nd_sendrsprobe(ifp); return 0; } +#endif /* defined(__rtems__) && defined(INET6) */ diff --git a/dhcpcd/platform.h b/dhcpcd/platform.h index 46797c16..d5066311 100644 --- a/dhcpcd/platform.h +++ b/dhcpcd/platform.h @@ -27,6 +27,9 @@ #ifndef PLATFORM_H #define PLATFORM_H +#ifdef __rtems__ +#include +#endif /* __rtems__ */ char *hardware_platform(void); #ifdef INET6 -- cgit v1.2.3