diff options
Diffstat (limited to 'src/input/file_input_plugin.c')
-rw-r--r-- | src/input/file_input_plugin.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/input/file_input_plugin.c b/src/input/file_input_plugin.c index 64a4030ab..07c1e4ed6 100644 --- a/src/input/file_input_plugin.c +++ b/src/input/file_input_plugin.c @@ -17,6 +17,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#include "config.h" /* must be first for large file support */ #include "input/file_input_plugin.h" #include "input_plugin.h" @@ -38,7 +39,7 @@ input_file_open(struct input_stream *is, const char *filename) char* pathname = g_strdup(filename); - if (filename[0] != '/') + if (!g_path_is_absolute(filename)) { g_free(pathname); return false; @@ -92,11 +93,11 @@ input_file_open(struct input_stream *is, const char *filename) } static bool -input_file_seek(struct input_stream *is, off_t offset, int whence) +input_file_seek(struct input_stream *is, goffset offset, int whence) { int fd = GPOINTER_TO_INT(is->data); - offset = lseek(fd, offset, whence); + offset = (goffset)lseek(fd, (off_t)offset, whence); if (offset < 0) { is->error = errno; return false; |