diff options
author | Yang Tse <yangsita@gmail.com> | 2010-01-28 10:27:09 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2010-01-28 10:27:09 +0000 |
commit | eff18763a1fdc37a45321dfc95f7bbfcec89777f (patch) | |
tree | d062d581297703d5699f2b0436629aef74635a99 /tests/libtest/lib571.c | |
parent | 3e21f1e971c7467b488a29a5da1f408c8e954b09 (diff) |
portability fix
Diffstat (limited to 'tests/libtest/lib571.c')
-rw-r--r-- | tests/libtest/lib571.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/libtest/lib571.c b/tests/libtest/lib571.c index f530deadc..4e9f38708 100644 --- a/tests/libtest/lib571.c +++ b/tests/libtest/lib571.c @@ -10,10 +10,12 @@ #include "test.h" -#include <unistd.h> -#include <fcntl.h> -#include <stdlib.h> +#ifdef HAVE_SYS_STAT_H #include <sys/stat.h> +#endif +#ifdef HAVE_FCNTL_H +#include <fcntl.h> +#endif #include <curl/mprintf.h> @@ -67,7 +69,7 @@ int test(char *URL) int request=1; FILE *protofile; - protofile = fopen(libtest_arg2, "w"); + protofile = fopen(libtest_arg2, "wb"); if(protofile == NULL) { fprintf(stderr, "Couldn't open the protocol dump file\n"); return TEST_ERR_MAJOR_BAD; |