Duplicate getprotobynumber() in 4.5.0-beta3a was Re: Problem building gateway

Joel Sherrill joel.sherrill at OARcorp.com
Wed Jul 12 17:50:32 UTC 2000


This problem report is because there is a real and dummy version of
getprotobynumber() and getprotobyname().  The real code works
by parsing a real file and will work if a real file is instantiated.
But the old code just looked things up in a structure.

If you disable lib/getprotoby.c, then you must setup the 
support files for the networking (like /etc/hosts, etc).

Aren't there other cases like this in the stack where if the file
does not exist, it is created with default information or something
is looked up in a structure.  If so, then I can see modifying
libc/getprotoent.c to default to the static table when the fopen()
fails.  This would require renaming the routines in lib/getprotoby.c
and invoking them when the fopen() fails.  Minor change.

Comments?  I would like to resolve this before cutting a release.


--joel

Alexey wrote:
> 
> Hi.
> Trying to build simple h323 gateway recieved the folloing errors:
> 
> /usr1/mips64orionel-rtems/bin/mips64orionel-rtems-gcc --pipe -B/usr1/mips64o
> rionel-rtems/rtems-4.5.0//p4650/lib/ -specs
> bsp_specs -qrtems -g -Wall -ansi -fasm -O4 -fomit-frame-pointer -DP4000 -DCP
> U_R4000 -DP3_DIAG -D_R4000 -D__mips=3 -m4650 -G0 -L
> /usr1/mips64orionel-rtems/rtems-4.5.0//p4650/lib -o o-optimize/test.exe
> o-optimize/main.o
> o-optimize/h323stub.o -lpt_rtems -lh323_rtems -lstdc++ -lpt_rtems -lh323_rte
> ms -lstdc++
> 
> /usr1/mips64orionel-rtems/rtems-4.5.0//p4650/lib/librtemsall.a(getprotoby.o)
> : In function `getprotobynumber':
> 
> /usr/local/rtems/build/rtems-4.5.0/mips64orionel-rtems/c/p4650/libnetworking
> /lib/../../../../../../../src/rtems-4.5.0-beta2/c/src/libnetworking/lib/getp
> rotoby.c:41: multiple definition of `getprotobynumber'
> 
> /usr1/mips64orionel-rtems/rtems-4.5.0//p4650/lib/librtemsall.a(getproto.o):/
> usr/local/rtems/build/rtems-4.5.0/mips64orionel-rtems/c/p4650/libnetworking/
> libc/../../../../../../../src/rtems-4.5.0-beta2/c/src/libnetworking/libc/get
> proto.c:47: first defined here
> 
> I never faced with such problem - can you suggest why it's happed?
> 
> Regards,
> Alexey

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985



More information about the users mailing list