diff options
-rw-r--r-- | filetap/ft_file_wrappers.c | 4 | ||||
-rw-r--r-- | plugins/asn1/packet-asn1.c | 4 | ||||
-rw-r--r-- | tfshark.c | 4 | ||||
-rwxr-xr-x | tools/checkAPIs.pl | 2 | ||||
-rw-r--r-- | tshark.c | 4 | ||||
-rw-r--r-- | wiretap/file_access.c | 4 | ||||
-rw-r--r-- | wiretap/file_wrappers.c | 4 |
7 files changed, 14 insertions, 12 deletions
diff --git a/filetap/ft_file_wrappers.c b/filetap/ft_file_wrappers.c index 2e19de97c5..1b9c62f545 100644 --- a/filetap/ft_file_wrappers.c +++ b/filetap/ft_file_wrappers.c @@ -781,7 +781,7 @@ FILE_F file_fdopen(int fd) { #ifdef _STATBUF_ST_BLKSIZE /* XXX, _STATBUF_ST_BLKSIZE portable? */ - struct stat st; + ws_statb64 st; #endif int want = GZBUFSIZE; FILE_F state; @@ -812,7 +812,7 @@ file_fdopen(int fd) gz_reset(state); #ifdef _STATBUF_ST_BLKSIZE - if (fstat(fd, &st) >= 0) { + if (ws_fstat64(fd, &st) >= 0) { /* * Yes, st_blksize can be bigger than an int; apparently, * it's a long on LP64 Linux, for example. diff --git a/plugins/asn1/packet-asn1.c b/plugins/asn1/packet-asn1.c index 12de099fe7..07bce98395 100644 --- a/plugins/asn1/packet-asn1.c +++ b/plugins/asn1/packet-asn1.c @@ -3148,7 +3148,7 @@ read_asn1_type_table(const char *filename) int ret; guint size = 0; guchar *data; - struct stat file_stat; + ws_statb64 file_stat; static guint mylogh = 0; if ((filename == 0) || (strlen(filename) == 0)) @@ -3170,7 +3170,7 @@ read_asn1_type_table(const char *filename) report_open_failure(filename, errno, FALSE); return; } - ret = fstat(fileno(f), &file_stat); + ret = ws_fstat64(fileno(f), &file_stat); if (ret!=-1) size = (int)file_stat.st_size; if (size == 0) { @@ -1960,9 +1960,9 @@ load_cap_file(capture_file *cf, int max_packet_count, gint64 max_byte_count) */ #ifndef _WIN32 if (print_packet_info) { - struct stat stat_stdout, stat_stderr; + ws_statb64 stat_stdout, stat_stderr; - if (fstat(1, &stat_stdout) == 0 && fstat(2, &stat_stderr) == 0) { + if (ws_fstat64(1, &stat_stdout) == 0 && ws_fstat64(2, &stat_stderr) == 0) { if (stat_stdout.st_dev == stat_stderr.st_dev && stat_stdout.st_ino == stat_stderr.st_ino) { fflush(stdout); diff --git a/tools/checkAPIs.pl b/tools/checkAPIs.pl index 992d8e3991..de1675bdb5 100755 --- a/tools/checkAPIs.pl +++ b/tools/checkAPIs.pl @@ -119,6 +119,8 @@ my %APIs = ( 'remove', 'fopen', 'freopen', + 'fstat', + 'lseek', # Misc 'tmpnam', # use mkstemp '_snwprintf' # use StringCchPrintf @@ -3417,9 +3417,9 @@ load_cap_file(capture_file *cf, char *save_file, int out_file_type, */ #ifndef _WIN32 if (print_packet_info) { - struct stat stat_stdout, stat_stderr; + ws_statb64 stat_stdout, stat_stderr; - if (fstat(1, &stat_stdout) == 0 && fstat(2, &stat_stderr) == 0) { + if (ws_fstat64(1, &stat_stdout) == 0 && ws_fstat64(2, &stat_stderr) == 0) { if (stat_stdout.st_dev == stat_stderr.st_dev && stat_stdout.st_ino == stat_stderr.st_ino) { fflush(stdout); diff --git a/wiretap/file_access.c b/wiretap/file_access.c index f320ffa236..3d21356361 100644 --- a/wiretap/file_access.c +++ b/wiretap/file_access.c @@ -2191,11 +2191,11 @@ static gboolean wtap_dump_open_finish(wtap_dumper *wdh, int file_type_subtype, g cant_seek = TRUE; } else { fd = fileno((FILE *)wdh->fh); - if (lseek(fd, 1, SEEK_CUR) == -1) + if (ws_lseek64(fd, 1, SEEK_CUR) == (off_t) -1) cant_seek = TRUE; else { /* Undo the seek. */ - lseek(fd, 0, SEEK_SET); + ws_lseek64(fd, 0, SEEK_SET); cant_seek = FALSE; } } diff --git a/wiretap/file_wrappers.c b/wiretap/file_wrappers.c index 0f30493ee6..a067193b13 100644 --- a/wiretap/file_wrappers.c +++ b/wiretap/file_wrappers.c @@ -781,7 +781,7 @@ FILE_T file_fdopen(int fd) { #ifdef _STATBUF_ST_BLKSIZE /* XXX, _STATBUF_ST_BLKSIZE portable? */ - struct stat st; + ws_statb64 st; #endif int want = GZBUFSIZE; FILE_T state; @@ -812,7 +812,7 @@ file_fdopen(int fd) gz_reset(state); #ifdef _STATBUF_ST_BLKSIZE - if (fstat(fd, &st) >= 0) { + if (ws_fstat64(fd, &st) >= 0) { /* * Yes, st_blksize can be bigger than an int; apparently, * it's a long on LP64 Linux, for example. |