move pread proto

pull/25/head
Török Edvin 14 years ago
parent ccb3713875
commit f99c892c02
  1. 8
      libclamav/fmap.c

@ -49,6 +49,10 @@ static inline unsigned int fmap_align_to(unsigned int sz, unsigned int al);
static inline unsigned int fmap_which_page(fmap_t *m, size_t at);
#ifndef _WIN32
/* pread proto here in order to avoid the use of XOPEN and BSD_SOURCE
which may in turn prevent some mmap constants to be defined */
ssize_t pread(int fd, void *buf, size_t count, off_t offset);
/* vvvvv POSIX STUFF BELOW vvvvv */
static off_t pread_cb(void *handle, void *buf, size_t count, off_t offset)
{
@ -56,10 +60,6 @@ static off_t pread_cb(void *handle, void *buf, size_t count, off_t offset)
}
/* pread proto here in order to avoid the use of XOPEN and BSD_SOURCE
which may in turn prevent some mmap constants to be defined */
ssize_t pread(int fd, void *buf, size_t count, off_t offset);
fmap_t *fmap_check_empty(int fd, off_t offset, size_t len, int *empty) {
unsigned int pages, mapsz, hdrsz;
unsigned short dumb = 1;

Loading…
Cancel
Save