On 4/24/06, Robert Story <[EMAIL PROTECTED]> wrote:
> VZ> The build failed again little later with the error
> VZ> ======================================
> VZ> UX:acomp: ERROR: "mibII/at.c", line 559: incomplete struct/union/enum
> VZ> arptab: sizeof()
> VZ> =============================
> VZ> Well, this is way above my head. Does anybody have any idea how to fix it?
>
> Yeah, you're gonna need someone with access to a unixware machine, and
> possibly a little system-specific knowledge, to fix this. Again, I'd really
> recommend you try 5.3.x.

Thank you for the suggestion, unfortunately, build of 5.3.0.1 fails
with the same eror

gcc -I../../include -I. -I../../agent -I../../agent/mibgroup
-I../../snmplib -g -O2 -Dsysv5UnixWare7 -c mibII/at.c  -fPIC -DPIC -o
mibII/.libs/at.lo
mibII/at.c: In function `ARP_Scan_Init':
mibII/at.c:557: sizeof applied to an incomplete type
mibII/at.c:566: sizeof applied to an incomplete type
mibII/at.c: In function `ARP_Scan_Next':
mibII/at.c:763: arithmetic on pointer to an incomplete type
mibII/at.c:763: dereferencing pointer to incomplete type
mibII/at.c:765: dereferencing pointer to incomplete type
mibII/at.c:767: dereferencing pointer to incomplete type
mibII/at.c:768: dereferencing pointer to incomplete type
gmake[2]: *** [mibII/at.lo] Error 1
gmake[2]: Leaving directory `/home/net-snmp-5.3.0.1/agent/mibgroup'
gmake[1]: *** [subdirs] Error 1
gmake[1]: Leaving directory `/home/net-snmp-5.3.0.1/agent'
gmake: *** [subdirs] Error 1

Now, line 557 of agent/mibgroup/mibII/at.c contains
        at = (struct arptab *) malloc(arptab_size * sizeof(struct arptab));
My investigation showed that
struct arptab {
         int             at_flags;
         char            at_enaddr[6];
         struct in_addr  at_iaddr;
         int             if_index;
};
has another structure as a member. I wrote a short C program to
calculate the sizeof(struct arptab), and if I change the line to look
like
at = (struct arptab *) malloc(arptab_size * 20);
gcc gets pass this line but fails on
mibII/at.c:765: arithmetic on pointer to an incomplete type
which is
        atab = &at[arptab_current++];
#endif                          /* STRUCT_ARPHD_HAS_AT_NEXT */

I have such a feeling that it could be as simple as providing a right
option for configure.
Does anybody have any ideas?
TIA
--
Vlad Z


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to