summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/pdb.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/opie-reader/pdb.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-reader/pdb.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/noncore/apps/opie-reader/pdb.cpp b/noncore/apps/opie-reader/pdb.cpp
index 68b904e..3054424 100644
--- a/noncore/apps/opie-reader/pdb.cpp
+++ b/noncore/apps/opie-reader/pdb.cpp
@@ -1,2 +1,5 @@
#include "pdb.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
@@ -48,6 +51,9 @@ bool Cpdb::openfile(const char *src)
// char buf[0x100];
- fseek(fin,0,SEEK_END);
- file_length = ftell(fin);
+ struct stat buf;
+ stat(src, &buf);
+ file_length = buf.st_size;
+// fseek(fin,0,SEEK_END);
+// file_length = ftell(fin);
- fseek(fin,0,SEEK_SET);
+// fseek(fin,0,SEEK_SET);