aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/file_access.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2005-11-07 02:45:19 +0000
committerGuy Harris <guy@alum.mit.edu>2005-11-07 02:45:19 +0000
commit7474bc0f13e306bfe66b5d86daf949c855c7cb57 (patch)
treef012a997193e2f249310bbbaabeb6b20df53f8ec /wiretap/file_access.c
parentb7407b5a2a89146ee4f52304d0484b33e0ce2bb3 (diff)
If we're using libz, make file_open() construct the open() flag
argument, rather than requiring the caller to get the open() flag and the fopen() flag in sync. That also means that if we're *not* using libz, it can just be a wrapper around eth_fopen(). We need to include <fcntl.h>, at least on UN*X, to get open() declared and the O_ flags defined. svn path=/trunk/; revision=16409
Diffstat (limited to 'wiretap/file_access.c')
-rw-r--r--wiretap/file_access.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/wiretap/file_access.c b/wiretap/file_access.c
index abc147afaf..19a0a7c269 100644
--- a/wiretap/file_access.c
+++ b/wiretap/file_access.c
@@ -254,7 +254,7 @@ wtap* wtap_open_offline(const char *filename, int *err, char **err_info,
}
if (do_random) {
- if (!(wth->random_fh = file_open(filename, O_RDONLY|O_BINARY, "rb"))) {
+ if (!(wth->random_fh = file_open(filename, "rb"))) {
*err = errno;
file_close(wth->fh);
g_free(wth);