[rtems-libbsd commit] freebsd-userspace/Makefile: Resolve conflict so ifconfig and netstat are both here

Joel Sherrill joel at rtems.org
Fri Sep 7 18:15:19 UTC 2012


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

Author:    Joel Sherrill <joel.sherrill at oarcorp.com>
Date:      Fri Sep  7 13:19:21 2012 -0500

freebsd-userspace/Makefile: Resolve conflict so ifconfig and netstat are both here

---

 freebsd-userspace/Makefile                        |   27 +++++++++++++++++++++
 freebsd-userspace/lib/libc/include/libc_private.h |    4 +++
 freebsd-userspace/rtems/include/namespace.h       |    2 +
 testsuite/netshell01/Makefile                     |    2 +-
 4 files changed, 34 insertions(+), 1 deletions(-)

diff --git a/freebsd-userspace/Makefile b/freebsd-userspace/Makefile
index 8e8adee..7472688 100644
--- a/freebsd-userspace/Makefile
+++ b/freebsd-userspace/Makefile
@@ -7,6 +7,7 @@ include $(PROJECT_ROOT)/make/leaf.cfg
 CFLAGS += -I include 
 CFLAGS += -I rtems/include 
 CFLAGS += -I lib/libc/include 
+CFLAGS += -I lib/netgraph
 CFLAGS += -I sys
 CFLAGS += -I local 
 # XXX hack to find rpc
@@ -78,6 +79,9 @@ C_FILES += lib/libc/resolv/res_send.c
 C_FILES += lib/libc/resolv/res_update.c
 C_FILES += lib/libc/string/strsep.c
 
+C_FILES += lib/libc/isc/ev_streams.c
+C_FILES += lib/libc/isc/ev_timers.c
+
 # RTEMS Specific Files
 # C_FILES += rtems/rtems-net-setup.c
 C_FILES += rtems/syslog.c
@@ -136,6 +140,29 @@ C_FILES += commands/sbin/ifconfig/ifpfsync.c
 # C_FILES += commands/sbin/ifconfig/regdomain.c
 # C_FILES += commands/sbin/ifconfig/af_ipx.c
 
+ifeq (1,0)
+# netstat command sources
+# no need to support AppleTalk yet
+# C_FILES += commands/usr.bin/netstat/atalk.c
+C_FILES += commands/usr.bin/netstat/bpf.c
+C_FILES += commands/usr.bin/netstat/if.c
+C_FILES += commands/usr.bin/netstat/inet6.c
+C_FILES += commands/usr.bin/netstat/inet.c
+C_FILES += commands/usr.bin/netstat/ipsec.c
+# no need to support IPX yet
+# C_FILES += commands/usr.bin/netstat/ipx.c
+C_FILES += commands/usr.bin/netstat/main.c
+C_FILES += commands/usr.bin/netstat/mbuf.c
+C_FILES += commands/usr.bin/netstat/mroute6.c
+C_FILES += commands/usr.bin/netstat/mroute.c
+# Disable netgraph support - this is a long thread to pull
+# C_FILES += commands/usr.bin/netstat/netgraph.c
+C_FILES += commands/usr.bin/netstat/pfkey.c
+C_FILES += commands/usr.bin/netstat/route.c
+C_FILES += commands/usr.bin/netstat/sctp.c
+C_FILES += commands/usr.bin/netstat/unix.c
+endif
+
 C_O_FILES = $(C_FILES:%.c=%.o)
 C_D_FILES = $(C_FILES:%.c=%.d)
 
diff --git a/freebsd-userspace/lib/libc/include/libc_private.h b/freebsd-userspace/lib/libc/include/libc_private.h
index d5f4212..060f77e 100644
--- a/freebsd-userspace/lib/libc/include/libc_private.h
+++ b/freebsd-userspace/lib/libc/include/libc_private.h
@@ -41,7 +41,11 @@
  * or more threads. It is used to avoid calling locking functions
  * when they are not required.
  */
+#ifdef __rtems__
+#define __isthreaded 1
+#else
 extern int	__isthreaded;
+#endif
 
 /*
  * libc should use libc_dlopen internally, which respects a global
diff --git a/freebsd-userspace/rtems/include/namespace.h b/freebsd-userspace/rtems/include/namespace.h
index 0737da5..78d3bc5 100644
--- a/freebsd-userspace/rtems/include/namespace.h
+++ b/freebsd-userspace/rtems/include/namespace.h
@@ -53,6 +53,8 @@
 #define _getprogname			getprogname
 #define _getsockname			getsockname
 
+#define _nsdispatch			nsdispatch
+
 
 
 #endif /* _NAMESPACE_H_ */
diff --git a/testsuite/netshell01/Makefile b/testsuite/netshell01/Makefile
index d6723ef..1491d9d 100644
--- a/testsuite/netshell01/Makefile
+++ b/testsuite/netshell01/Makefile
@@ -12,7 +12,7 @@ C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o)
 AM_CPPFLAGS += -I $(INSTALL_BASE)/include
 AM_CPPFLAGS += -I ../init01
 LINK_LIBS += $(INSTALL_BASE)/libbsdc.a
-LINK_LIBS += $(INSTALL_BASE)/libbsd.a ${REL_ARGS}
+LINK_LIBS += $(INSTALL_BASE)/libbsd.a -lm ${REL_ARGS} 
 
 include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
 include $(RTEMS_CUSTOM)




More information about the vc mailing list