[OpenAFS-port-freebsd] Changes <netinet/in_var.h> and Copilation
Error.
Benjamin Kaduk
kaduk@MIT.EDU
Fri, 11 Nov 2011 00:00:00 -0500 (EST)
On Fri, 11 Nov 2011, Alexandr A. Panshin wrote:
> 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)
I agree with your assessment. This OpenAFS code is common to multiple
OSes, so I'm not immediately sure of the best fix, but I will put a fix in
my next update to net/openafs, which I expect will be before 9.0-release.
Thanks for the report,
Ben Kaduk