Module Compilation Error in vnode.h, missing vnode_if.h

Can Sar csar at stanford.edu
Fri Jul 28 22:22:21 UTC 2006


Hi,

I am trying to compile a module for 6.0-RELEASE that includes  
vnode.h . Unfortunately even the simple test file below fails. It  
claims that sys/vnode_if.h is missing (which upon checking is true)  
and seems to be missing in general as well:
"http://fxr.watson.org/fxr/source/sys/vnode_if.h?v=RELENG60"
Any idea what I could be doing wrong?

Thank you very much for your help,
Can Sar

======================== ekm.c (my own testfile) =====================

#include <sys/param.h>
#include <sys/vnode.h>

int main() {
   struct vnode vp;
   struct vattr vap;
   struct ucred cred;

   VOP_GETATTR(&vp, &vap, &cred, NULL);
}

============================== Error ===============================

In file included from ekm.c:2:
@/sys/vnode.h:547:22: vnode_if.h: No such file or directory
In file included from ekm.c:2:
@/sys/vnode.h:566: warning: "struct vop_lease_args" declared inside  
parameter li
st
@/sys/vnode.h:566: warning: its scope is only this definition or  
declaration, wh
ich is probably not what you want
@/sys/vnode.h:584: warning: "struct vop_lease_args" declared inside  
parameter li
st
@/sys/vnode.h:646: warning: "struct vop_lookup_args" declared inside  
parameter l
ist
@/sys/vnode.h:650: warning: "struct vop_bmap_args" declared inside  
parameter lis
t
@/sys/vnode.h:651: warning: "struct vop_fsync_args" declared inside  
parameter li
st
@/sys/vnode.h:652: warning: "struct vop_getwritemount_args" declared  
inside para
meter list
@/sys/vnode.h:653: warning: "struct vop_getpages_args" declared  
inside parameter
list
@/sys/vnode.h:654: warning: "struct vop_inactive_args" declared  
inside parameter
list
@/sys/vnode.h:655: warning: "struct vop_islocked_args" declared  
inside parameter
list
@/sys/vnode.h:656: warning: "struct vop_kqfilter_args" declared  
inside parameter
list
@/sys/vnode.h:657: warning: "struct vop_lock_args" declared inside  
parameter lis
t
@/sys/vnode.h:658: warning: "struct vop_putpages_args" declared  
inside parameter
list
@/sys/vnode.h:659: warning: "struct vop_unlock_args" declared inside  
parameter l
ist
@/sys/vnode.h:660: warning: "struct vop_poll_args" declared inside  
parameter lis
t
@/sys/vnode.h:661: warning: "struct vop_pathconf_args" declared  
inside parameter
list
@/sys/vnode.h:662: warning: "struct vop_poll_args" declared inside  
parameter lis
t
@/sys/vnode.h:738: warning: "struct vop_kqfilter_args" declared  
inside parameter
list
@/sys/vnode.h:740: warning: "struct vop_readdir_args" declared inside  
parameter
list
ekm.c:4: warning: function declaration isn't a prototype
ekm.c: In function `main':
ekm.c:7: error: storage size of 'cred' isn't known
ekm.c:9: warning: implicit declaration of function `VOP_GETATTR'
ekm.c:9: warning: nested extern declaration of `VOP_GETATTR'
ekm.c:7: warning: unused variable `cred'
*** Error code 1

Stop in /usr/home/csar/explode/test.



More information about the freebsd-questions mailing list