Harvey,
This particular ifdef was added to R3.13.4 so that it would be
compatible with the SENS IP kernel present in Tornado II.
#if ( defined (BSD) && ( BSD >= 44 ) ) || defined ( SOCKADDR_HAS_LEN )
size = pifreq->ifr_addr.sa_len + sizeof(pifreq->ifr_name);
if (size < sizeof(*pifreq))
size = sizeof(*pifreq);
#else
size = sizeof(*pifreq);
Apparently, the condition "(BSD) && ( BSD >= 44 )" is true on your OS
despite the fact that your OS does not, by default, expose an IP kernel
interface that behaves like BSD 4.4?
In hindsight, I should have added the following to the vxWorks/osiSock.h
and if_depen.c and let each OS define ifreq_size(pifreq) as necessary
in xxx/osiSock.h
In vxWorks/osiSock.h:
#if ( defined (BSD) && ( BSD >= 44 ) )
# define ifreq_size(pifreq) (pifreq->ifr_addr.sa_len + sizeof(pifreq->ifr_name))
#else
# define ifreq_size(pifreq) sizeof(*pifreq)
#endif
In ca/if_depen.c:
static struct ifreq * ifreqNext ( struct ifreq *pifreq )
{
size_t size;
size = ifreq_size ( pifreq );
if ( size < sizeof ( *pifreq ) ) {
size = sizeof ( *pifreq );
}
return ( struct ifreq * )( size + ( char * ) pifreq );
}
I have committed this change to CVS and it will show up
in the next release of R3.14 (and also in next R3.13
release - if there is one).
Jeff
> -----Original Message-----
> From: Geoff Savage [mailto:[email protected]]
> Sent: Wednesday, May 23, 2001 1:31 PM
> To: Rarback, Harvey
> Cc: '[email protected]'; Straumann, Till; Wermelskirchen, Clemens
> Subject: Re: Build failure for if_depen.c
>
>
> Hi,
>
> We use OSF1 v5.1 here at Fermilab. To solve this I added
> -D_SOCKADDR_LEN to the command line.
> Here are the notes from the send man page.
>
> NOTES
>
> [Tru64 UNIX] The send() function is identical to the sendto()
> function
> with a zero-valued dest_len parameter, and to the write() function if
> no
> flags are used. For that reason, the send() function is disabled when
> 4.4BSD behavior is enabled (that is, when the _SOCKADDR_LEN
> compile-time
> option is defined).
>
> I also had to modify base/src/include/os/alpha/osiSock.h to handle the
> disabling of the send() function (see note above). If this is not done
> there are unresolved symbols at link time. Here are the lines I added
> to osiSock.h for the alpha.
>
> #undef send
> #define send(A,B,C,D) sendto(A,B,C,D,NULL,NULL)
> #undef recv
> #define recv(A,B,C,D) recvfrom(A,B,C,D,NULL,NULL)
>
> On OSF1 we have seen an assert error from a client app with a connected
> channel when we reboot the processor on which the PV lives. Have you
> seen this?
>
> Geoff
>
> "Rarback, Harvey" wrote:
> >
> > Folks,
> >
> > I am trying to build EPICS base 3.13.4 (Host only) on a Tru64 UNIX 4.0f platform. The build fails at
> >
> > cc -std1 -O -D_OSF_SOURCE -call_shared -DUNIX -I. -I.. -I../../../incl
> > ude -I../../../include/os/alpha -c ../if_depen.c
> > cc: Error: ../if_depen.c, line 62: In this statement, "sa_len" is not a member o
> > f "pifreq->ifr_ifru.ifru_addr". (needmember)
> > size = pifreq->ifr_addr.sa_len + sizeof(pifreq->ifr_name);
> >
> > The relevant source line is
> >
> > #if ( defined (BSD) && ( BSD >= 44 ) ) || defined ( SOCKADDR_HAS_LEN )
> > size = pifreq->ifr_addr.sa_len + sizeof(pifreq->ifr_name);
> > if (size < sizeof(*pifreq))
> > size = sizeof(*pifreq);
> > #else
> > size = sizeof(*pifreq);
> >
> > Can some kind soul help me?
> > --Harvey
> > ----
> > Harvey Rarback phone: (650)926-3963
> > Stanford Linear Accelerator Center fax: (650)926-4100
> > 2575 Sand Hill Road home phone: (650)560-9111
> > Menlo Park, CA 94025
> > [email protected]
> >
> > "I am a pitbull on the pantleg of opportunity."
> > -George W. Bush
- Replies:
- Re: Build failure for if_depen.c Kazuro FURUKAWA
- References:
- Re: Build failure for if_depen.c Geoff Savage
- Navigate by Date:
- Prev:
Re: Build failure for if_depen.c Geoff Savage
- Next:
Re: Build failure for if_depen.c Kazuro FURUKAWA
- Index:
1994
1995
1996
1997
1998
1999
2000
<2001>
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: Build failure for if_depen.c Geoff Savage
- Next:
Re: Build failure for if_depen.c Kazuro FURUKAWA
- Index:
1994
1995
1996
1997
1998
1999
2000
<2001>
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|