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.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/noncore/apps/opie-reader/pdb.cpp b/noncore/apps/opie-reader/pdb.cpp
index 3054424..dca67ff 100644
--- a/noncore/apps/opie-reader/pdb.cpp
+++ b/noncore/apps/opie-reader/pdb.cpp
@@ -1,7 +1,7 @@
#include "pdb.h"
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
+#ifdef _WINDOWS
+#include <winsock2.h>
+#endif
size_t Cpdb::recordpos(int n)
{
@@ -49,13 +49,10 @@ bool Cpdb::openfile(const char *src)
// just holds the first few chars of the file
// char buf[0x100];
- struct stat buf;
- stat(src, &buf);
- file_length = buf.st_size;
-// fseek(fin,0,SEEK_END);
-// file_length = ftell(fin);
+ fseek(fin,0,SEEK_END);
+ file_length = ftell(fin);
-// fseek(fin,0,SEEK_SET);
+ fseek(fin,0,SEEK_SET);
fread(&head, 1, sizeof(head), fin);