diff options
author | Guy Harris <guy@alum.mit.edu> | 2004-06-30 06:58:59 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2004-06-30 06:58:59 +0000 |
commit | 272a2055ab3114ba4a114f8ceb48be1d58933028 (patch) | |
tree | e35e4f58df8b9b618df0f9855582071721321781 /wiretap/file_access.c | |
parent | 24527148ab2dc1e052ebe3679d5277cc68bfeb47 (diff) |
On at least some platforms, a #define of O_BINARY is needed even if
<fcntl.h> is included, as <fcntl.h> doesn't define it.
svn path=/trunk/; revision=11276
Diffstat (limited to 'wiretap/file_access.c')
-rw-r--r-- | wiretap/file_access.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/wiretap/file_access.c b/wiretap/file_access.c index 82ea2121a4..55bdf7429a 100644 --- a/wiretap/file_access.c +++ b/wiretap/file_access.c @@ -1,6 +1,6 @@ /* file_access.c * - * $Id: file_access.c,v 1.13 2004/06/29 20:46:29 ulfl Exp $ + * $Id: file_access.c,v 1.14 2004/06/30 06:58:59 guy Exp $ * * Wiretap Library * Copyright (c) 1998 by Gilbert Ramirez <gram@alumni.rice.edu> @@ -207,6 +207,11 @@ wtap* wtap_open_offline(const char *filename, int *err, char **err_info, return NULL; } +/* Win32 needs the O_BINARY flag for open() */ +#ifndef O_BINARY +#define O_BINARY 0 +#endif + /* Open the file */ errno = WTAP_ERR_CANT_OPEN; wth->fd = open(filename, O_RDONLY|O_BINARY); |