diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2015-02-15 15:18:35 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2015-02-15 15:18:35 -0600 |
commit | 1169d36fd1d02c9c0432ee3317c4a749931c7f68 (patch) | |
tree | 6403ed9b9569bd1fc3c779313a6b00d122570ea1 | |
parent | 0b348732427125d0555ff8002f24576f441d4834 (diff) | |
download | px4-nuttx-1169d36fd1d02c9c0432ee3317c4a749931c7f68.tar.gz px4-nuttx-1169d36fd1d02c9c0432ee3317c4a749931c7f68.tar.bz2 px4-nuttx-1169d36fd1d02c9c0432ee3317c4a749931c7f68.zip |
Suffer the consequences of moving struct timeval to its correct location
30 files changed, 54 insertions, 13 deletions
diff --git a/apps/examples/cc3000/cc3000basic.c b/apps/examples/cc3000/cc3000basic.c index e1b17f8b4..a3747a4bc 100644 --- a/apps/examples/cc3000/cc3000basic.c +++ b/apps/examples/cc3000/cc3000basic.c @@ -113,6 +113,7 @@ #include <stdbool.h> #include <sys/time.h> #include <arpa/inet.h> + #include <nuttx/arch.h> #include <nuttx/wireless/cc3000/nvmem.h> #include <nuttx/wireless/cc3000/include/sys/socket.h> @@ -120,6 +121,7 @@ #include <nuttx/wireless/cc3000/hci.h> #include <nuttx/wireless/cc3000/security.h> #include <nuttx/wireless/cc3000/netapp.h> + #include "shell.h" /**************************************************************************** diff --git a/apps/examples/poll/net_listener.c b/apps/examples/poll/net_listener.c index ce068585a..aadc5a2ba 100644 --- a/apps/examples/poll/net_listener.c +++ b/apps/examples/poll/net_listener.c @@ -43,6 +43,7 @@ #include <sys/select.h> #include <sys/socket.h> #include <sys/ioctl.h> +#include <sys/time.h> #include <stdint.h> #include <stdbool.h> diff --git a/apps/examples/poll/net_reader.c b/apps/examples/poll/net_reader.c index 8597acdab..082ce1b41 100644 --- a/apps/examples/poll/net_reader.c +++ b/apps/examples/poll/net_reader.c @@ -43,6 +43,7 @@ #include <sys/stat.h> #include <sys/select.h> #include <sys/socket.h> +#include <sys/time.h> #include <stdint.h> #include <stdio.h> diff --git a/apps/examples/poll/select_listener.c b/apps/examples/poll/select_listener.c index 65e6b6a72..b624cbef7 100644 --- a/apps/examples/poll/select_listener.c +++ b/apps/examples/poll/select_listener.c @@ -42,6 +42,7 @@ #include <sys/types.h> #include <sys/stat.h> #include <sys/select.h> +#include <sys/time.h> #include <stdbool.h> #include <stdio.h> #include <unistd.h> diff --git a/apps/modbus/nuttx/portserial.c b/apps/modbus/nuttx/portserial.c index fdeb9bc6b..c3c7baa37 100644 --- a/apps/modbus/nuttx/portserial.c +++ b/apps/modbus/nuttx/portserial.c @@ -31,6 +31,7 @@ #include <sys/types.h> #include <sys/stat.h> #include <sys/select.h> +#include <sys/time.h> #include <fcntl.h> #include <unistd.h> #include <assert.h> diff --git a/apps/netutils/dhcpc/dhcpc.c b/apps/netutils/dhcpc/dhcpc.c index b6e0c6b14..974618b38 100644 --- a/apps/netutils/dhcpc/dhcpc.c +++ b/apps/netutils/dhcpc/dhcpc.c @@ -43,6 +43,7 @@ #include <sys/types.h> #include <sys/socket.h> +#include <sys/time.h> #include <stdlib.h> #include <stdint.h> diff --git a/apps/netutils/dnsclient/dns_socket.c b/apps/netutils/dnsclient/dns_socket.c index 693aae7f7..eb09cd72a 100644 --- a/apps/netutils/dnsclient/dns_socket.c +++ b/apps/netutils/dnsclient/dns_socket.c @@ -48,6 +48,8 @@ #include <nuttx/config.h> +#include <sys/socket.h> +#include <sys/time.h> #include <stdint.h> #include <string.h> #include <unistd.h> @@ -56,7 +58,6 @@ #include <debug.h> #include <assert.h> -#include <sys/socket.h> #include <arpa/inet.h> #include <netinet/in.h> diff --git a/apps/netutils/ntpclient/ntpclient.c b/apps/netutils/ntpclient/ntpclient.c index a0d8d19f6..13607c420 100644 --- a/apps/netutils/ntpclient/ntpclient.c +++ b/apps/netutils/ntpclient/ntpclient.c @@ -40,6 +40,7 @@ #include <nuttx/config.h> #include <sys/socket.h> +#include <sys/time.h> #include <stdio.h> #include <stdlib.h> diff --git a/apps/netutils/tftpc/tftpc_packets.c b/apps/netutils/tftpc/tftpc_packets.c index 8775ca3a2..bf7aaef00 100644 --- a/apps/netutils/tftpc/tftpc_packets.c +++ b/apps/netutils/tftpc/tftpc_packets.c @@ -41,6 +41,7 @@ #include <sys/types.h> #include <sys/socket.h> +#include <sys/time.h> #include <stdint.h> #include <stdbool.h> #include <stdio.h> diff --git a/apps/netutils/thttpd/libhttpd.h b/apps/netutils/thttpd/libhttpd.h index b245a6edf..248d9bbe2 100644 --- a/apps/netutils/thttpd/libhttpd.h +++ b/apps/netutils/thttpd/libhttpd.h @@ -45,6 +45,7 @@ #include <sys/types.h> #include <sys/socket.h> +#include <sys/time.h> #include <stdint.h> #include <stdbool.h> #include <netinet/in.h> diff --git a/apps/netutils/thttpd/thttpd_cgi.c b/apps/netutils/thttpd/thttpd_cgi.c index 27eb470cf..d02ebd18e 100644 --- a/apps/netutils/thttpd/thttpd_cgi.c +++ b/apps/netutils/thttpd/thttpd_cgi.c @@ -42,6 +42,7 @@ #include <sys/types.h> #include <sys/stat.h> +#include <sys/time.h> #include <stdint.h> #include <stdbool.h> #include <stdio.h> diff --git a/apps/netutils/thttpd/thttpd_cgi.h b/apps/netutils/thttpd/thttpd_cgi.h index 47923223c..5431156d8 100644 --- a/apps/netutils/thttpd/thttpd_cgi.h +++ b/apps/netutils/thttpd/thttpd_cgi.h @@ -54,6 +54,7 @@ extern int cgi(httpd_conn *hc); #if CONFIG_THTTPD_CGI_TIMELIMIT > 0 +struct timeval; static void cgi_kill(ClientData client_data, struct timeval *now); #endif diff --git a/apps/netutils/thttpd/timers.h b/apps/netutils/thttpd/timers.h index 7c8f9f201..0b2d34451 100644 --- a/apps/netutils/thttpd/timers.h +++ b/apps/netutils/thttpd/timers.h @@ -41,7 +41,7 @@ * Included Files ****************************************************************************/ -#include <time.h> +#include <sys/time.h> /**************************************************************************** * Pre-processor Definitions diff --git a/apps/netutils/webclient/webclient.c b/apps/netutils/webclient/webclient.c index 389306ce9..7e876488a 100644 --- a/apps/netutils/webclient/webclient.c +++ b/apps/netutils/webclient/webclient.c @@ -55,6 +55,7 @@ #endif #include <sys/socket.h> +#include <sys/time.h> #include <stdint.h> #include <stdio.h> #include <stdbool.h> diff --git a/apps/netutils/webserver/httpd.c b/apps/netutils/webserver/httpd.c index f177a51ea..bd7f3a092 100644 --- a/apps/netutils/webserver/httpd.c +++ b/apps/netutils/webserver/httpd.c @@ -49,6 +49,7 @@ #include <sys/types.h> #include <sys/socket.h> +#include <sys/time.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> diff --git a/nuttx/arch/sim/src/up_wpcap.c b/nuttx/arch/sim/src/up_wpcap.c index 6225751db..69c808c53 100644 --- a/nuttx/arch/sim/src/up_wpcap.c +++ b/nuttx/arch/sim/src/up_wpcap.c @@ -50,6 +50,7 @@ #include <winsock2.h> #include <iphlpapi.h> +#include <sys/time.h> #include <stdio.h> #include <stdlib.h> #include <malloc.h> diff --git a/nuttx/drivers/wireless/cc3000/cc3000.c b/nuttx/drivers/wireless/cc3000/cc3000.c index f264136ad..c9cea31e1 100644 --- a/nuttx/drivers/wireless/cc3000/cc3000.c +++ b/nuttx/drivers/wireless/cc3000/cc3000.c @@ -48,6 +48,7 @@ #include <nuttx/config.h> #include <sys/types.h> +#include <sys/time.h> #include <stdint.h> #include <stdbool.h> diff --git a/nuttx/drivers/wireless/cc3000/cc3000_socket.h b/nuttx/drivers/wireless/cc3000/cc3000_socket.h index 02144fe90..4287e9cf5 100644 --- a/nuttx/drivers/wireless/cc3000/cc3000_socket.h +++ b/nuttx/drivers/wireless/cc3000/cc3000_socket.h @@ -387,6 +387,8 @@ long cc3000_connect_impl(long sd, FAR const struct sockaddr *addr, socklen_t add * *****************************************************************************/ +struct timeval; + int cc3000_select_impl(long nfds, TICC3000fd_set *readfds, TICC3000fd_set *writefds,TICC3000fd_set *exceptfds, struct timeval *timeout); diff --git a/nuttx/drivers/wireless/cc3000/socket.c b/nuttx/drivers/wireless/cc3000/socket.c index e15cf500d..87d7f4dac 100644 --- a/nuttx/drivers/wireless/cc3000/socket.c +++ b/nuttx/drivers/wireless/cc3000/socket.c @@ -38,6 +38,7 @@ #include <sys/types.h> #include <sys/select.h> +#include <sys/time.h> #include <stdio.h> #include <string.h> diff --git a/nuttx/drivers/wireless/cc3000/socket_imp.c b/nuttx/drivers/wireless/cc3000/socket_imp.c index 7354f04fe..d52fe270d 100644 --- a/nuttx/drivers/wireless/cc3000/socket_imp.c +++ b/nuttx/drivers/wireless/cc3000/socket_imp.c @@ -39,11 +39,13 @@ * Included Files *****************************************************************************/ +#include <sys/time.h> #include <stdio.h> #include <string.h> #include <unistd.h> #include <debug.h> #include <stdlib.h> + #include <nuttx/wireless/cc3000/hci.h> #include "cc3000_socket.h" #include <nuttx/wireless/cc3000/evnt_handler.h> diff --git a/nuttx/fs/nfs/rpc_clnt.c b/nuttx/fs/nfs/rpc_clnt.c index e19588404..ea62e1053 100644 --- a/nuttx/fs/nfs/rpc_clnt.c +++ b/nuttx/fs/nfs/rpc_clnt.c @@ -79,6 +79,7 @@ ****************************************************************************/ #include <sys/socket.h> +#include <sys/time.h> #include <queue.h> #include <time.h> #include <netinet/in.h> diff --git a/nuttx/fs/vfs/fs_select.c b/nuttx/fs/vfs/fs_select.c index 33a7a11bc..0edb8efbd 100644 --- a/nuttx/fs/vfs/fs_select.c +++ b/nuttx/fs/vfs/fs_select.c @@ -40,6 +40,7 @@ #include <nuttx/config.h> #include <sys/select.h> +#include <sys/time.h> #include <string.h> #include <poll.h> diff --git a/nuttx/include/nuttx/wireless/cc3000/include/sys/socket.h b/nuttx/include/nuttx/wireless/cc3000/include/sys/socket.h index 77a0f1b2e..6eb1df2ef 100644 --- a/nuttx/include/nuttx/wireless/cc3000/include/sys/socket.h +++ b/nuttx/include/nuttx/wireless/cc3000/include/sys/socket.h @@ -288,6 +288,7 @@ int connect(int sockfd, FAR const struct sockaddr *addr, socklen_t addrlen); * *****************************************************************************/ +struct timeval; int cc3000_select(int nfds, fd_set *readfds, fd_set *writefds,fd_set *exceptfds, struct timeval *timeout); diff --git a/nuttx/include/sys/select.h b/nuttx/include/sys/select.h index 1ff074b6c..6ce8ff861 100644 --- a/nuttx/include/sys/select.h +++ b/nuttx/include/sys/select.h @@ -104,13 +104,15 @@ typedef uint32_t fd_set[__SELECT_NUINT32]; #undef EXTERN #if defined(__cplusplus) #define EXTERN extern "C" -extern "C" { +extern "C" +{ #else #define EXTERN extern #endif -EXTERN int select(int nfds, FAR fd_set *readfds, FAR fd_set *writefds, - FAR fd_set *exceptfds, FAR struct timeval *timeout); +struct timeval; +int select(int nfds, FAR fd_set *readfds, FAR fd_set *writefds, + FAR fd_set *exceptfds, FAR struct timeval *timeout); #undef EXTERN #if defined(__cplusplus) diff --git a/nuttx/include/sys/types.h b/nuttx/include/sys/types.h index 530434b22..102bde622 100644 --- a/nuttx/include/sys/types.h +++ b/nuttx/include/sys/types.h @@ -94,8 +94,9 @@ #define PRIOR_OTHER_MIN 0 #define PRIOR_OTHER_MAX 255 -/* Scheduling Priorities. NOTE: Only the idle task can take - * the true minimum priority. */ +/* Scheduling Priorities. NOTE: Only the idle task can take the true + * minimum priority. + */ #define SCHED_PRIORITY_MAX 255 #define SCHED_PRIORITY_DEFAULT 100 diff --git a/nuttx/include/time.h b/nuttx/include/time.h index 832927ea8..c43385ace 100644 --- a/nuttx/include/time.h +++ b/nuttx/include/time.h @@ -159,12 +159,6 @@ struct sigevent; * Public Data ********************************************************************************/ -/* extern char *tznames[]; not supported */ - -/******************************************************************************** - * Public Function Prototypes - ********************************************************************************/ - #undef EXTERN #if defined(__cplusplus) #define EXTERN extern "C" @@ -174,6 +168,19 @@ extern "C" #define EXTERN extern #endif +/* daylight - Daylight savings time flag */ +/* EXTERN int daylight; not supported */ + +/* timezone - Difference from UTC and local standard time +/* EXTERN long int timezone; not supported */ + +/* tzname[] - Timezone strings */ +/* EXTERN FAR char *tzname[]; not supported */ + +/******************************************************************************** + * Public Function Prototypes + ********************************************************************************/ + clock_t clock(void); int clock_settime(clockid_t clockid, FAR const struct timespec *tp); diff --git a/nuttx/net/socket/getsockopt.c b/nuttx/net/socket/getsockopt.c index 60c316471..2af5dce60 100644 --- a/nuttx/net/socket/getsockopt.c +++ b/nuttx/net/socket/getsockopt.c @@ -42,6 +42,7 @@ #include <sys/types.h> #include <sys/socket.h> +#include <sys/time.h> #include <errno.h> #include "socket/socket.h" diff --git a/nuttx/net/socket/setsockopt.c b/nuttx/net/socket/setsockopt.c index 7784b6520..61e502ddf 100644 --- a/nuttx/net/socket/setsockopt.c +++ b/nuttx/net/socket/setsockopt.c @@ -43,6 +43,7 @@ #include <sys/types.h> #include <sys/socket.h> +#include <sys/time.h> #include <errno.h> #include <arch/irq.h> diff --git a/nuttx/net/utils/net_dsec2timeval.c b/nuttx/net/utils/net_dsec2timeval.c index df6db20db..b454844fa 100644 --- a/nuttx/net/utils/net_dsec2timeval.c +++ b/nuttx/net/utils/net_dsec2timeval.c @@ -40,8 +40,10 @@ #include <nuttx/config.h> #include <sys/socket.h> +#include <sys/time.h> #include <stdint.h> #include <errno.h> + #include <nuttx/clock.h> #include "utils/utils.h" diff --git a/nuttx/net/utils/net_timeval2dsec.c b/nuttx/net/utils/net_timeval2dsec.c index af67cdc4e..b4beaf4ef 100644 --- a/nuttx/net/utils/net_timeval2dsec.c +++ b/nuttx/net/utils/net_timeval2dsec.c @@ -39,6 +39,8 @@ #include <nuttx/config.h> +#include <sys/time.h> + #include <nuttx/clock.h> #include "utils/utils.h" |