[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/2] pread: new module
From: |
Richard W.M. Jones |
Subject: |
Re: [PATCH 1/2] pread: new module |
Date: |
Wed, 25 Nov 2009 15:41:15 +0000 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
I'm getting the following error when cross-compiling with
--host=i686-pc-mingw32:
make[4]: Entering directory `/home/rjones/d/libguestfs-mingw/daemon/lib'
GEN configmake.h
CC pread.o
pread.c:34: error: conflicting types for 'pread'
./unistd.h:705: note: previous declaration of 'pread' was here
pread.c: In function 'pread':
pread.c:49: warning: implicit declaration of function '__libc_read'
make[4]: *** [pread.o] Error 1
make[4]: Target `all-am' not remade because of errors.
make[4]: Leaving directory `/home/rjones/d/libguestfs-mingw/daemon/lib'
make[3]: *** [all-recursive] Error 1
Lines 704-706 of unistd.h are:
# if !0 || 0
extern ssize_t pread (int fd, char *buf, size_t bufsize, off_t offset);
# endif
Line 33-34 of pread.c are:
ssize_t
pread (int fd, void *buf, size_t nbyte, off_t offset)
I'm guessing the problem is void * vs char *, unless the off_t types
also differ.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
New in Fedora 11: Fedora Windows cross-compiler. Compile Windows
programs, test, and build Windows installers. Over 70 libraries supprt'd
http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw