3 --- libmpeg3/mpeg3io.c.orig 2010-02-01 08:26:23.000000000 +0000
6 #include "mpeg3private.h"
7 #include "mpeg3protos.h"
14 @@ -35,8 +35,8 @@ int mpeg3_copy_fs(mpeg3_fs_t *dst, mpeg3
16 int64_t mpeg3io_get_total_bytes(mpeg3_fs_t *fs)
18 - struct stat64 ostat;
19 - stat64(fs->path, &ostat);
21 + stat(fs->path, &ostat);
22 fs->total_bytes = ostat.st_size;
23 return fs->total_bytes;
25 @@ -50,8 +50,8 @@ int64_t mpeg3io_get_total_bytes(mpeg3_fs
27 int64_t mpeg3io_path_total_bytes(char *path)
30 - if(stat64(path, &st) < 0) return 0;
32 + if(stat(path, &st) < 0) return 0;
36 @@ -61,7 +61,7 @@ int mpeg3io_open_file(mpeg3_fs_t *fs)
37 mpeg3_get_keys(fs->css, fs->path);
39 //printf("mpeg3io_open_file 1 %s\n", fs->path);
40 - if(!(fs->fd = fopen64(fs->path, "rb")))
41 + if(!(fs->fd = fopen(fs->path, "rb")))
43 if (fs->path) fprintf(stderr,"[mpeg3io_open_file] Error opening file '%s': ",fs->path);
45 @@ -162,7 +162,7 @@ void mpeg3io_read_buffer(mpeg3_fs_t *fs)
49 - fseeko64(fs->fd, new_buffer_position, SEEK_SET);
50 + fseek(fs->fd, new_buffer_position, SEEK_SET);
51 fread(fs->buffer, 1, remainder_start, fs->fd);
54 @@ -177,7 +177,7 @@ void mpeg3io_read_buffer(mpeg3_fs_t *fs)
55 fs->buffer_position = fs->current_byte;
56 fs->buffer_offset = 0;
58 - result = fseeko64(fs->fd, fs->buffer_position, SEEK_SET);
59 + result = fseek(fs->fd, fs->buffer_position, SEEK_SET);
60 //printf("mpeg3io_read_buffer 2 %llx %llx\n", fs->buffer_position, ftell(fs->fd));
61 fs->buffer_size = fread(fs->buffer, 1, MPEG3_IO_SIZE, fs->fd);
63 @@ -216,27 +216,27 @@ void mpeg3io_complete_path(char *complet
65 int mpeg3io_device(char *path, char *device)
67 - struct stat64 file_st, device_st;
70 + struct stat file_st, device_st;
74 - if(stat64(path, &file_st) < 0)
75 + if(stat(path, &file_st) < 0)
77 perror("mpeg3io_device");
81 - fp = setmntent(MOUNTED, "r");
82 - while(fp && (mnt = getmntent(fp)))
84 + while(fp && (mnt = getfsent()))
86 - if(stat64(mnt->mnt_fsname, &device_st) < 0) continue;
87 + if(stat(mnt->fs_spec, &device_st) < 0) continue;
88 if(device_st.st_rdev == file_st.st_dev)
90 - strncpy(device, mnt->mnt_fsname, MPEG3_STRLEN);
91 + strncpy(device, mnt->fs_spec, MPEG3_STRLEN);