/* Return the size of the file, as reported by the OS. (gint64, in case that's 64 bits.)  */
gint64 wtap_file_size(wtap *wth, int *err)
/* Return the size of the file, as reported by the OS. (gint64, in case that's 64 bits.)  */
gint64 wtap_file_size(wtap *wth, int *err)
{
	ws_statb64 statb;
	if (file_fstat((wth->fh == NULL) ? wth->random_fh : wth->fh,
	    &statb, err) == -1)
		return -1;
	return statb.st_size;
}