Kernel build fails with nested extern declaration warning

Seshan Parameswaran seshan.parameswaran at gmail.com
Wed Nov 30 08:52:04 UTC 2011


Hello All
                   Kindly excuse the trouble please.  I am trying to
compile a custom code I have written at the nfs layer and I am getting the
following error
/usr/src/sys/nfsclient/nfs_bio.c: In function 'nfs_read_disk':
/usr/src/sys/nfsclient/nfs_bio.c:1832: warning: implicit declaration of
function 'lseek'
/usr/src/sys/nfsclient/nfs_bio.c:1832: warning: nested extern declaration
of 'lseek'
/usr/src/sys/nfsclient/nfs_bio.c:1837: warning: implicit declaration of
function 'read'
/usr/src/sys/nfsclient/nfs_bio.c:1837: warning: nested extern declaration
of 'read'
/usr/src/sys/nfsclient/nfs_bio.c: In function 'nfs_read_part':
/usr/src/sys/nfsclient/nfs_bio.c:1851: error: too few arguments to function
'malloc'
/usr/src/sys/nfsclient/nfs_bio.c:1855: error: too few arguments to function
'free'
*** Error code 1

Stop in /usr/obj/usr/src/sys/DEBUGKERNEL.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.

I am using a custom header file that includes <sys/unistd.h>.  I am not
sure how to circumvent this error and proceed further.  Any inputs would be
deeply  appreciated.

Thanks

Seshan


More information about the freebsd-questions mailing list