[OpenAFS-devel] compile error on OpenSolaris 2008.11 with 1.4.8

Joel hashbang@gmail.com
Sun, 11 Jan 2009 06:02:46 -0600


I agree, ``conn'' is probably not the best choice, especially inside a
commonly included header file.

Interestingly enough, I was trying to think of reasons this compiled
fine for a friend of mine, but not me. Since this is a new OpenSolaris
install, GNU make wasn't around, so typing make invoked Sun's make.
Using gmake made everything compile fine. I haven't really looked into
why this is, but it worked.

Joel

On Fri, Jan 9, 2009 at 11:36 PM, Dale Ghent <daleg@elemental.org> wrote:
> On Jan 9, 2009, at 12:43 PM, Joel wrote:
>
>>
>> afs_nfsdisp.o -c /space/openafs/openafs-1.4.8/src/afs/afs_nfsdis
>> p.c
>> "/space/openafs/openafs-1.4.8/src/afs/afs.h", line 294: (struct) tag
>> redeclared: conn
>>
>> From what I can tell, conn is defined in /usr/include/rpc/rpc_rdma.h
>> which is included in afs_nfsdisp.c, AND in afs.h. Both places are
>> important, so renaming is probably out of the question. Any thoughts?
>
> This is going to be a pain in the ass to fix or work around.
>
> On one hand, shame on the NFS RDMA team for instituting such a
> generically-named global. On the other, shame on openafs for doing the same.
> But openafs was there first. Oh well.
>
> Looking at the code, there doesn't seem to be a way we can #ifdef our way
> around this. If might be easier for us to just rename struct conn to
> something more specific, such as afs_pconn.
>
> O elders, what sayeth thou?
>
> /dale
>