summaryrefslogtreecommitdiffstats
path: root/dhcpcd
diff options
context:
space:
mode:
authorChristian Mauderer <christian.mauderer@embedded-brains.de>2018-04-25 16:28:00 +0200
committerChristian Mauderer <christian.mauderer@embedded-brains.de>2018-05-03 07:09:46 +0200
commit338f3005fc420b2c26f597ae6c0754f391c9fcca (patch)
tree3424b962d75391b9d796e0af52365108323fe3b4 /dhcpcd
parenttcpdump: Remove unused file. (diff)
downloadrtems-libbsd-338f3005fc420b2c26f597ae6c0754f391c9fcca.tar.bz2
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.
Diffstat (limited to 'dhcpcd')
-rw-r--r--dhcpcd/config.h1
-rw-r--r--dhcpcd/dhcp6.c5
-rw-r--r--dhcpcd/ipv6.c5
-rw-r--r--dhcpcd/ipv6.h3
-rw-r--r--dhcpcd/ipv6nd.c5
-rw-r--r--dhcpcd/platform.h3
6 files changed, 22 insertions, 0 deletions
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 <spawn.h>
#include <stdint.h>
#include "compat/pollts.h"
+#include <rtems/bsd/local/opt_inet6.h>
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 <rtems/bsd/local/opt_inet6.h>
+#endif /* __rtems__ */
+#if defined(__rtems__) && defined(INET6)
#include <sys/stat.h>
#include <sys/utsname.h>
@@ -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 <rtems/bsd/local/opt_inet6.h>
+#endif /* __rtems__ */
+#if defined(__rtems__) && defined(INET6)
#include <sys/param.h>
#include <sys/types.h>
#include <sys/socket.h>
@@ -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 <sys/queue.h>
#include <netinet/in.h>
+#ifdef __rtems__
+#include <rtems/bsd/local/opt_inet6.h>
+#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 <rtems/bsd/local/opt_inet6.h>
+#endif /* __rtems__ */
+#if defined(__rtems__) && defined(INET6)
#include <sys/ioctl.h>
#include <sys/param.h>
#include <sys/socket.h>
@@ -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 <rtems/bsd/local/opt_inet6.h>
+#endif /* __rtems__ */
char *hardware_platform(void);
#ifdef INET6