[OpenAFS-port-freebsd] Changes <netinet/in_var.h> and Copilation Error.

Alexandr A. Panshin alexp@tsc.ru
Fri, 11 Nov 2011 11:52:13 +0700


   Hi, All!
I am testing openAFS on FreeBSD. It seems fine, but I have some problem.
The openafs port (and libafs.ko)  may be compiled only on native
FreeBSD-9.0-RC1 (without any updates).


I try CVSup  update for FreeBSD src tree, build It.   And I see problem
while compile openafs:


> cc -I. -I.. -I../nfs  -I/usr/ports/net/openafs/work/openafs-1.6.0/src  -I/usr/ports/net/openafs/work/openafs-1.6.0/src/afs  -I/usr/ports/net/openafs/work/openafs-1.6.0/src/afs/FBSD  
> -I/usr/ports/net/openafs/work/openafs-1.6.0/src/config -I/usr/ports/net/openafs/work/openafs-1.6.0/src/rx/FBSD -I/usr/ports/net/openafs/work/openafs-1.6.0/src/rxkad  
> -I/usr/ports/net/openafs/work/openafs-1.6.0/src/util  -I/usr/ports/net/openafs/work/openafs-1.6.0/src  -I/usr/ports/net/openafs/work/openafs-1.6.0/src/afs  
> -I/usr/ports/net/openafs/work/openafs-1.6.0/src/afs/FBSD  -I/usr/ports/net/openafs/work/openafs-1.6.0/src/util -I/usr/ports/net/openafs/work/openafs-1.6.0/src/rxkad  -I/usr/ports/net/openafs/work/openafs-1.6.0/src/config  
> -I/usr/ports/net/openafs/work/openafs-1.6.0/src/fsint -I/usr/ports/net/openafs/work/openafs-1.6.0/src/vlserver  -I/usr/ports/net/openafs/work/openafs-1.6.0/include  
> -I/usr/ports/net/openafs/work/openafs-1.6.0/include/afs -g -O -I. -I.. -I/usr/ports/net/openafs/work/openafs-1.6.0/src/config  -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA -DGETMOUNT -Wall -nostdinc -I/usr/include -D_KERNEL -DKLD_MODULE  -elf  
> -mno-align-long-strings -fno-common -ffreestanding -I/usr/ports/net/openafs/work/conf - include opt_global.h -fno-strict-aliasing -fPIC -mno-red-zone -O2  -o afs_server.o -c /usr/ports/net/openafs/work/openafs-1.6.0/src/afs/afs_server.c
> /usr/ports/net/openafs/work/openafs-1.6.0/src/afs/afs_server.c: In function 'afsi_SetServerIPRank':
> /usr/ports/net/openafs/work/openafs-1.6.0/src/afs/afs_server.c:1204: 
> error: 'struct in_ifaddr' has no member named 'ia_netmask'
> /usr/ports/net/openafs/work/openafs-1.6.0/src/afs/afs_server.c:1204: 
> error: 'struct in_ifaddr' has no member named 'ia_net'
> *** Error code 1
>
> Stop in /usr/ports/net/openafs/work/openafs-1.6.0/src/libafs/MODLOAD.
> *** Error code 1
>
> Stop in /usr/ports/net/openafs/work/openafs-1.6.0/src/libafs.
> *** Error code 1
>
> Stop in /usr/ports/net/openafs/work/openafs-1.6.0.
> *** Error code 1


In my opinion this bug initiated by patch:

http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/netinet/in_var.h.diff?r1=1.76.2.1;r2=1.76.2.2;sortby=date

  From system structure in_ifaddr commiter glebius removed 2 fields:
'ia_netmask' and 'ia_net'.
on 2011-10-20 glebius aproved 5 changes
(http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/netinet/?sortby=date#dirlist)


My system: FreeBSD kdc2.hcei.tsc.ru 9.0-RC1 FreeBSD 9.0-RC1 #0: Thu Nov 
10 00:41:36 GMT-7 2011 
root@kdc2.hcei.tsc.ru:/usr/obj/usr/src/sys/GENERIC  amd64

I downgrade FreeBSD src tree and AFS was compiled good. But now I wait 
for 9.0-RELEASE ...

WBR Alexandr Panshin