diff options
author | Yang Tse <yangsita@gmail.com> | 2009-06-04 19:11:11 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2009-06-04 19:11:11 +0000 |
commit | 00883822be245d2660a569e6bde38892b9433aa2 (patch) | |
tree | fa514c8150d6e40853498f9779f4fd68f907fda3 /lib/file.c | |
parent | 13fdb9d8a56deff52eb16bce6b78e6710a42958a (diff) | |
download | curl-00883822be245d2660a569e6bde38892b9433aa2.tar.gz |
allow building libcurl for VxWorks
Diffstat (limited to 'lib/file.c')
-rw-r--r-- | lib/file.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/file.c b/lib/file.c index 7e55bd6db..3d1d2bbcb 100644 --- a/lib/file.c +++ b/lib/file.c @@ -95,6 +95,12 @@ #define DOS_FILESYSTEM 1 #endif +#ifdef OPEN_NEEDS_ARG3 +# define open_readonly(p,f) open((p),(f),(0)) +#else +# define open_readonly(p,f) open((p),(f)) +#endif + /* * Forward declarations. */ @@ -251,10 +257,10 @@ static CURLcode file_connect(struct connectdata *conn, bool *done) if(actual_path[i] == '/') actual_path[i] = '\\'; - fd = open(actual_path, O_RDONLY | O_BINARY); /* no CR/LF translation! */ + fd = open_readonly(actual_path, O_RDONLY|O_BINARY); /* no CR/LF translation */ file->path = actual_path; #else - fd = open(real_path, O_RDONLY); + fd = open_readonly(real_path, O_RDONLY); file->path = real_path; #endif file->freepath = real_path; /* free this when done */ |