From 528a149def94c2251285c3862de06e33a20db9c9 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 15 Sep 2005 21:50:50 +0000 Subject: ifdef for includes, added checking for two not previously checked files (one being necessary for solaris builds) --- tests/server/tftpd.c | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/server/tftpd.c b/tests/server/tftpd.c index f122c9b1e..bc9c82e1c 100644 --- a/tests/server/tftpd.c +++ b/tests/server/tftpd.c @@ -49,16 +49,37 @@ */ #include "setup.h" /* portability help from the lib directory */ +#ifdef HAVE_SYS_TYPES_H #include +#endif +#ifdef HAVE_SYS_IOCTL_H #include +#endif +#ifdef HAVE_SYS_STAT_H #include +#endif + #include -#include +#ifdef HAVE_FCNTL_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H #include +#endif +#ifdef HAVE_NETINET_IN_H #include +#endif +#ifdef HAVE_ARPA_TFTP_H #include +#endif +#ifdef HAVE_NETDB_H #include +#endif +#ifdef HAVE_SYS_FILIO_H +/* FIONREAD on Solaris 7 */ +#include +#endif #include #include @@ -683,7 +704,7 @@ static void sendfile(struct testcase *test, struct formats *pf) { struct tftphdr *dp; struct tftphdr *ap; /* ack packet */ - u_int16_t block = 1; + unsigned short block = 1; int size, n; mysignal(SIGALRM, timer); @@ -752,7 +773,7 @@ static void recvfile(struct testcase *test, struct formats *pf) { struct tftphdr *dp; struct tftphdr *ap; /* ack buffer */ - u_int16_t block = 0; + unsigned short block = 0; int n, size; mysignal(SIGALRM, timer); -- cgit v1.2.3