Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Nov 2011 00:28:18 -0800
From:      Seshan Parameswaran <seshan.parameswaran@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   Kernel build fails with nested extern declaration warning
Message-ID:  <CAAasV21bfZ+8gWS0gcryd2H52Ao2UE2OMNqud=iDVa=TpT=4Xg@mail.gmail.com>

Next in thread | Raw E-Mail | Index | Archive | Help
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



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?CAAasV21bfZ+8gWS0gcryd2H52Ao2UE2OMNqud=iDVa=TpT=4Xg>