summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2012-09-07 13:19:21 -0500
committerJoel Sherrill <joel.sherrill@oarcorp.com>2012-09-07 13:19:21 -0500
commite6fe77ef56f424b0cf72080fc37163be44f14ee8 (patch)
treef5a004ac3085edf44ccc5ed49ad947f8497c141f
parentebbe3cc71f18159cf021192241a2a7a397fff4f8 (diff)
downloadrtems-libbsd-e6fe77ef56f424b0cf72080fc37163be44f14ee8.tar.bz2
freebsd-userspace/Makefile: Resolve conflict so ifconfig and netstat are both here
-rw-r--r--freebsd-userspace/Makefile27
-rw-r--r--freebsd-userspace/lib/libc/include/libc_private.h4
-rw-r--r--freebsd-userspace/rtems/include/namespace.h2
-rw-r--r--testsuite/netshell01/Makefile2
4 files changed, 34 insertions, 1 deletions
diff --git a/freebsd-userspace/Makefile b/freebsd-userspace/Makefile
index 8e8adee2..74726882 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 d5f4212f..060f77e0 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 0737da5b..78d3bc57 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 d6723efb..1491d9d9 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)