aboutsummaryrefslogtreecommitdiff
path: root/tests/server
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-09-15 21:50:50 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-09-15 21:50:50 +0000
commit528a149def94c2251285c3862de06e33a20db9c9 (patch)
treeab16183b6559b001374513907f9a452a02c53d3a /tests/server
parent29e36afb6bf24fa9e0443a57031f4ecccce63314 (diff)
ifdef for includes, added checking for two not previously checked files (one
being necessary for solaris builds)
Diffstat (limited to 'tests/server')
-rw-r--r--tests/server/tftpd.c27
1 files changed, 24 insertions, 3 deletions
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 <sys/types.h>
+#endif
+#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
+#endif
+
#include <signal.h>
-#include <fcntl.h>
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
+#endif
+#ifdef HAVE_ARPA_TFTP_H
#include <arpa/tftp.h>
+#endif
+#ifdef HAVE_NETDB_H
#include <netdb.h>
+#endif
+#ifdef HAVE_SYS_FILIO_H
+/* FIONREAD on Solaris 7 */
+#include <sys/filio.h>
+#endif
#include <setjmp.h>
#include <stdio.h>
@@ -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);