summaryrefslogtreecommitdiffstats
path: root/src/phbf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/phbf.c')
-rw-r--r--src/phbf.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/phbf.c b/src/phbf.c
index cb0bf95..3589eba 100644
--- a/src/phbf.c
+++ b/src/phbf.c
@@ -71,6 +71,12 @@
#include "phbf.h"
#include "phnc.h"
+#if defined(HAVE_FSEEKO) && !defined(__MINGW32__)
+#define my_fseek fseeko
+#else
+#define my_fseek fseek
+#endif
+
//#define DEBUG_BF
//#define DEBUG_BF2
#define READ_SIZE 1024*512
@@ -328,11 +334,7 @@ static bf_status_t photorec_bf_pad(struct ph_param *params, file_recovery_t *fil
uint64_t file_size_backup;
nbr=0;
offset_error_tmp=file_recovery->offset_error;
-#ifdef HAVE_FSEEKO
- if(fseeko(file_recovery->handle, file_recovery->file_size, SEEK_SET) < 0)
-#else
- if(fseek(file_recovery->handle, file_recovery->file_size, SEEK_SET) < 0)
-#endif
+ if(my_fseek(file_recovery->handle, file_recovery->file_size, SEEK_SET) < 0)
return BF_ENOENT;
#if 1
if(file_recovery->data_check!=NULL)