[rtems-libbsd commit] netstat: Add macros to assist use of getopt_r()

Joel Sherrill joel at rtems.org
Tue Oct 23 21:45:33 UTC 2012


Module:    rtems-libbsd
Branch:    master
Commit:    bea701c3a081ea259a17b5f85fb3d34ec0575acb
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=bea701c3a081ea259a17b5f85fb3d34ec0575acb

Author:    Joel Sherrill <joel.sherrill at oarcorp.com>
Date:      Tue Oct 23 16:48:54 2012 -0500

netstat: Add macros to assist use of getopt_r()

---

 freebsd-userspace/commands/usr.bin/netstat/main.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/freebsd-userspace/commands/usr.bin/netstat/main.c b/freebsd-userspace/commands/usr.bin/netstat/main.c
index a6411df..e5e3b2d 100644
--- a/freebsd-userspace/commands/usr.bin/netstat/main.c
+++ b/freebsd-userspace/commands/usr.bin/netstat/main.c
@@ -750,6 +750,10 @@ main(int argc, char *argv[])
 	int ch;
 #ifdef __rtems__
 	struct getopt_data getopt_reent;
+#define optind getopt_reent.optind
+#define optarg getopt_reent.optarg
+#define opterr getopt_reent.opterr
+#define optopt getopt_reent.optopt
 #endif
 
 	af = AF_UNSPEC;




More information about the vc mailing list