[OpenAFS-devel] FreeBSD 4.8-stable compile failure

David Magda David Magda <dmagda@ee.ryerson.ca>
Fri, 13 Jun 2003 22:34:48 -0400


Hello,

Getting a compile compile error under FreeBSD ('uname -a'):

FreeBSD number6.magda.ca 4.8-STABLE FreeBSD 4.8-STABLE #0

OpenAFS source is from CVS now:

Fri Jun 13 21:59:34 EDT 2003

The issue is that under FreeBSD 5.x you need to define a prototype,
but under under 4.x it raises a conflict:

/* other VNOPS (please fix these) */
extern int afs_open();
extern int afs_close();
extern int vnode_pager_freepage();  <--- THIS ONE
extern int HandleIoctl();
extern int afs_fsync();

That function is already defined in /usr/include/vm/vnode_pager.h
under FreeBSD 4.x.

The entry was removed from the FBSD tree about two years ago in the
developement branch (but still present in the 'stable' branch):

http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/vm/vnode_pager.h

Revision 1.14 had it, 1.15 did not.

In both 4.x and 5.x, vnode_pager_freepage(m) is simply a wrapper
around vm_page_free(m). Doing a s/vnode_pager_freepage/vm_page_free/
may be the easiest solution as that function is only used in
src/afs/FBSD/osi_vnodeops.c.

-- 
David Magda <dmagda at ee.ryerson.ca>, http://www.magda.ca/
Because the innovator has for enemies all those who have done well under
the old conditions, and lukewarm defenders in those who may do well 
under the new. -- Niccolo Machiavelli, _The Prince_, Chapter VI