diff --git a/builtin/Makefile b/builtin/Makefile index 2d8b0193e..0efb832f8 100644 --- a/builtin/Makefile +++ b/builtin/Makefile @@ -77,18 +77,30 @@ $(COBJS): %$(OBJEXT): %.c builtin_list.h: registry/.updated $(call DELFILE, builtin_list.h) + $(Q) touch builtin_list.h ifeq ($(CONFIG_WINDOWS_NATIVE),y) $(Q) for /f %%G in ('dir /b registry\*.bdat`) do ( type registry\%%G >> builtin_list.h ) else - $(Q) for file in `ls registry/*.bdat`; do cat $$file >> builtin_list.h; done + $(Q) ( \ + filelist=`ls registry/*.bdat 2>/dev/null || echo ""`; \ + for file in $$filelist; \ + do cat $$file >> builtin_list.h; \ + done; \ + ) endif builtin_proto.h: registry/.updated $(call DELFILE, builtin_proto.h) + $(Q) touch builtin_proto.h ifeq ($(CONFIG_WINDOWS_NATIVE),y) $(Q) for /f %%G in ('dir /b registry\*.pdat`) do ( type registry\%%G >> builtin_proto.h ) else - $(Q) for file in `ls registry/*.pdat`; do cat $$file >> builtin_proto.h; done + $(Q) ( \ + filelist=`ls registry/*.pdat 2>/dev/null || echo ""`; \ + for file in $$filelist; \ + do cat $$file >> builtin_proto.h; \ + done; \ + ) endif .built: builtin_list.h builtin_proto.h $(OBJS) diff --git a/nshlib/nsh_mntcmds.c b/nshlib/nsh_mntcmds.c index 690d027ca..f6eb26c31 100644 --- a/nshlib/nsh_mntcmds.c +++ b/nshlib/nsh_mntcmds.c @@ -45,10 +45,13 @@ #include #include +#include #include #include #include +#include + #include "nsh.h" #include "nsh_console.h" diff --git a/nshlib/nsh_netcmds.c b/nshlib/nsh_netcmds.c index 371d30460..506950e14 100644 --- a/nshlib/nsh_netcmds.c +++ b/nshlib/nsh_netcmds.c @@ -67,6 +67,7 @@ #if defined(CONFIG_NET_ICMP) && defined(CONFIG_NET_ICMP_PING) && \ !defined(CONFIG_DISABLE_CLOCK) && !defined(CONFIG_DISABLE_SIGNALS) # include +# include #endif #if defined(CONFIG_NET_UDP) && CONFIG_NFILE_DESCRIPTORS > 0