[rtems-libbsd commit] DHCPCD(8): Add getopt_long_r() support
Sebastian Huber
sebh at rtems.org
Thu Jan 30 15:35:14 UTC 2014
Module: rtems-libbsd
Branch: master
Commit: f724741db0d48a6fd0bb07ac42bba9b203d3eb71
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=f724741db0d48a6fd0bb07ac42bba9b203d3eb71
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Tue Jan 21 16:14:42 2014 +0100
DHCPCD(8): Add getopt_long_r() support
---
dhcpcd/dhcpcd.c | 5 +++++
dhcpcd/if-options.c | 3 +++
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/dhcpcd/dhcpcd.c b/dhcpcd/dhcpcd.c
index 492ad97..a772b86 100644
--- a/dhcpcd/dhcpcd.c
+++ b/dhcpcd/dhcpcd.c
@@ -37,6 +37,9 @@ const char dhcpcd_copyright[] = "Copyright (c) 2006-2014 Roy Marples";
#include <ctype.h>
#include <errno.h>
+#ifdef __rtems__
+#define __need_getopt_newlib
+#endif /* __rtems__ */
#include <getopt.h>
#include <limits.h>
#include <paths.h>
@@ -1095,6 +1098,8 @@ signal_init(void (*func)(int, siginfo_t *, void *), sigset_t *oldset)
#ifdef __rtems__
#include <rtems/libio.h>
+struct getopt_data dhcpcd_getopt_data;
+
static int
main(int argc, char **argv);
diff --git a/dhcpcd/if-options.c b/dhcpcd/if-options.c
index c793009..7244f8d 100644
--- a/dhcpcd/if-options.c
+++ b/dhcpcd/if-options.c
@@ -33,6 +33,9 @@
#include <ctype.h>
#include <errno.h>
+#ifdef __rtems__
+#define __need_getopt_newlib
+#endif /* __rtems__ */
#include <getopt.h>
#include <limits.h>
#include <paths.h>
More information about the vc
mailing list