[prev in list] [next in list] [prev in thread] [next in thread] 

List:       zebra
Subject:    [zebra 3603] compiler warnings and errors
From:       Vesselin Mladenov <mladenov () netbg ! com>
Date:       2000-04-28 20:20:50
[Download RAW message or body]


Slackware 4.0, libc5 gcc verion 2.7.2.3


 ./configure --enable-vtysh --enable-netlink

1. ------------------
gcc -DHAVE_CONFIG_H -DSYSCONFDIR=\"/usr/local/etc/\" -I.. -I..
-I../lib    -g -O2 -Wall -c vty.c
vty.c: In function `vty_serv_un':
vty.c:1642: warning: passing arg 2 of `bind' from incompatible pointer
type
vty.c: In function `vtysh_accept':
vty.c:1666: warning: passing arg 2 of `accept' from incompatible pointer
type
gcc -DHAVE_CONFIG_H -DSYSCONFDIR=\"/usr/local/etc/\" -I.. -I..
-I../lib    -g -O2 -Wall -c command.c


2. -----------------------

gcc -DHAVE_CONFIG_H -DSYSCONFDIR=\"/usr/local/etc/\" -I.. -I..
-I../lib    -g -O2 -Wall -c buffer.c
buffer.c: In function `buffer_flush':
buffer.c:253: warning: implicit declaration of function `writev'
gcc -DHAVE_CONFIG_H -DSYSCONFDIR=\"/usr/local/etc/\" -I.. -I..
-I../lib    -g -O2 -Wall -c table.c


writev appears in sys/uio.h with glibc >= 2.1.x.
unfortunatelly it is not there in libc5, although man page claims that.
It's not a harm, but

#if __GLIBC__ >= 2 && __GLIBC_MINOR >= 1
#include <sys/uio.h>
#else
#include <sys/uio.h.libc5>
#endif

wouldn't be inappropriate.
May be I'm wrong.


3. ------------------------

Making all in zebra
make[2]: Entering directory `/usr/src/zebra-0.86/zebra'
gcc -DHAVE_CONFIG_H -DSYSCONFDIR=\"/usr/local/etc/\" -I.. -I..
-I../lib    -g -O2 -Wall -c irdp.c
irdp.c: In function `irdp_valid_check':
irdp.c:323: dereferencing pointer to incomplete type
irdp.c:328: dereferencing pointer to incomplete type
irdp.c:330: dereferencing pointer to incomplete type
irdp.c:337: dereferencing pointer to incomplete type
irdp.c: In function `irdp_packet_process':
irdp.c:403: dereferencing pointer to incomplete type
make[2]: *** [irdp.o] Error 1
make[2]: Leaving directory `/usr/src/zebra-0.86/zebra'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/zebra-0.86'
make: *** [all-recursive-am] Error 2


The reference to icmp struct doesn't work with libc5. May be struct
icmphdr should be used in case of libc5,
as defined in linux/icmp.h

I put that in irdp.c

#if !(__GLIBC__ >= 2 && __GLIBC_MINOR >= 1)
#define icmp icmphdr
#define icmp_type type
#define icmp_code code
#endif


and it worked for me, without problems.




4. ----------------

make[2]: Leaving directory `/usr/src/zebra-0.86/ospfd'
Making all in vtysh
make[2]: Entering directory `/usr/src/zebra-0.86/vtysh'
make[2]: *** No rule to make target `vtysh.c', needed by `vtysh.o'.
Stop.
make[2]: Leaving directory `/usr/src/zebra-0.86/vtysh'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/zebra-0.86'
make: *** [all-recursive-am] Error 2

This may be is just a reminder for developers :)





["mladenov.vcf" (text/x-vcard)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic