Buildroot: conflicting types for 'sendfile64'
Michael Hunold
hunold at linuxtv.org
Mon Jan 30 16:40:19 UTC 2006
Hi,
Peter S. Mazinger wrote:
> I have done an update to svn, please try that first, if not....
I updated svn, created a uClibc snapshot from that and ran buildroot again.
---------------------schnipp-----------------------------------
make[2]: Entering directory
`/mnt/teemhu/devel/buildroot/buildroot/toolchain_build_mips_nofpu/uClibc'
CC ldso/ldso/ldso.oS
In file included from ./ldso/include/ldso.h:34,
from ldso/ldso/ldso.c:33:
./ldso/include/dl-syscall.h: In function `_dl_exit':
./ldso/include/dl-syscall.h:69: error: syntax error before "asm"
./ldso/include/dl-syscall.h:69: error: syntax error before "asm"
./ldso/include/dl-syscall.h:69: error: syntax error before "asm"
./ldso/include/dl-syscall.h:69: error: `__v0' undeclared (first use in
this function)
./ldso/include/dl-syscall.h:69: error: (Each undeclared identifier is
reported only once
./ldso/include/dl-syscall.h:69: error: for each function it appears in.)
./ldso/include/dl-syscall.h:69: error: `__a3' undeclared (first use in
this function)
./ldso/include/dl-syscall.h:69: error: `__a0' undeclared (first use in
this function)
./ldso/include/dl-syscall.h: In function `_dl_close':
./ldso/include/dl-syscall.h:72: error: syntax error before "asm"
./ldso/include/dl-syscall.h:72: error: syntax error before "asm"
./ldso/include/dl-syscall.h:72: error: syntax error before "asm"
./ldso/include/dl-syscall.h:72: error: `__v0' undeclared (first use in
this function)
./ldso/include/dl-syscall.h:72: error: `__a3' undeclared (first use in
this function)
./ldso/include/dl-syscall.h:72: error: `__a0' undeclared (first use in
this function)
./ldso/include/dl-syscall.h: In function `_dl_open':
./ldso/include/dl-syscall.h:75: error: syntax error before "asm"
---------------------schnipp-----------------------------------
> I need your help for this because I can't reproduce.
Perhaps you can try out buildroot and select a simple MIPS big-endian
target.
But I understand if you're not interested in MIPS. I'll try to help you
out as best as I can.
> the include/sys/{sendfile.h,cdefs.h},
> libc/sysdeps/linux/common/{sendfile.c,syscalls.h} matter.
>
> sendfile.c includes syscalls.h, that disables __USE_FILE_OFFSET64 if it is
> defined. after this it includes sys/sendfile.h that should catch the first
> prototype for sendfile()
>
> could you please add #warning here-nr(nr=1....) or something else that you
> can identify what part you include from sendfile.h?
>
I went back to the snapshot from today and added the checks you
suggested in sendfile.h. I had a look at the #ifdef/#ifndef lines and
added an appropriate warning.
---------------------schnipp-----------------------------------
teemhu uClibc% pwd
/mnt/teemhu/devel/buildroot/buildroot/toolchain_build_mips_nofpu/uClibc
teemhu uClibc% nedit include/sys/sendfile.h
---------------------schnipp-----------------------------------
This results in:
---------------------schnipp-----------------------------------
CC libc/sysdeps/linux/common/sendfile.os
In file included from libc/sysdeps/linux/common/sendfile.c:12:
./include/sys/sendfile.h:34:2: warning: #warning "__USE_FILE_OFFSET64
not defined"
./include/sys/sendfile.h:49:2: warning: #warning "__USE_LARGEFILE64 defined"
libc/sysdeps/linux/common/sendfile.c:18: error: conflicting types for
'sendfile64'
./include/sys/sendfile.h:51: error: previous declaration of 'sendfile64'
was here
libc/sysdeps/linux/common/sendfile.c:18: error: conflicting types for
'sendfile64'
./include/sys/sendfile.h:51: error: previous declaration of 'sendfile64'
was here
---------------------schnipp-----------------------------------
> I assume that for some reason when you get to include sendfile.h, you
> have
> __USE_FILE_OFFSET64 defined, please find the place where it gets
> defined
Seems like __USE_FILE_OFFSET64 is *not* defined and __USE_LARGEFILE64 is
defined.
Does this make sense?
> Thanks, Peter
CU
Michael.
More information about the uClibc
mailing list