--===============1366126857==
Content-Type: multipart/alternative; boundary="0-1514476936-1182977207=:85688"
Content-Transfer-Encoding: 8bit

--0-1514476936-1182977207=:85688
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

I am compiling NetSNMP 5.4 with our "mipsel-uclibc-g++" compiler and I am receiving this compiler error:

snmpTCPDomain.c: In function `int netsnmp_tcp_accept(netsnmp_transport*)':
snmpTCPDomain.c:199: error: cannot convert `sockaddr_in*' to `sockaddr*' in assignment


Should the following line....

farend = (struct sockaddr_in *) &(addr_pair->remote_addr);

be changed to ...

farend = (struct sockaddr *) &(addr_pair->remote_addr);


Here is the original code snipet:

static int
netsnmp_tcp_accept(netsnmp_transport *t)
{
struct sockaddr *farend = NULL;
netsnmp_udp_addr_pair *addr_pair = NULL;
int newsock = -1, sockflags = 0;
socklen_t farendlen = sizeof(struct sockaddr_in);
char *str = NULL;

addr_pair = (netsnmp_udp_addr_pair *)malloc(sizeof(netsnmp_udp_addr_pair));

if (addr_pair == NULL) {
/*
* Indicate that the acceptance of this socket failed.
*/
DEBUGMSGTL(("netsnmp_tcp", "accept: malloc failed\n"));
return -1;
}

farend = (struct sockaddr_in *) &(addr_pair->remote_addr);

if (t != NULL && t->sock >= 0) {
newsock = accept(t->sock, farend, &farendlen);

if (newsock < 0) {
DEBUGMSGTL(("netsnmp_tcp", "accept failed rc %d errno %d \"%s\"\n",

etc...
etc...



---------------------------------
Yahoo! oneSearch: Finally, mobile search that gives answers, not web links.
--0-1514476936-1182977207=:85688
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

I am compiling NetSNMP 5.4 with our "mipsel-uclibc-g++" compiler and I am receiving this compiler error:

snmpTCPDomain.c: In function `int netsnmp_tcp_accept(netsnmp_transport*)':
snmpTCPDomain.c:199: error: cannot convert `sockaddr_in*' to `sockaddr*' in assignment


Should the following line....

    farend = (struct sockaddr_in *) &(addr_pair->remote_addr);

be changed to ...

    farend = (struct sockaddr *) &(addr_pair->remote_addr);


Here is the original code snipet:

static int
netsnmp_tcp_accept(netsnmp_transport *t)
{
    struct sockaddr *farend = NULL;
    netsnmp_udp_addr_pair *addr_pair = NULL;
    int             newsock = -1, sockflags = 0;
    socklen_t       farendlen = sizeof(struct sockaddr_in);
    char           *str = NULL;

    addr_pair =
(netsnmp_udp_addr_pair *)malloc(sizeof(netsnmp_udp_addr_pair));

    if (addr_pair == NULL) {
        /*
         * Indicate that the acceptance of this socket failed. 
         */
        DEBUGMSGTL(("netsnmp_tcp", "accept: malloc failed\n"));
        return -1;
    }

    farend = (struct sockaddr_in *) &(addr_pair->remote_addr);

    if (t != NULL && t->sock >= 0) {
        newsock = accept(t->sock, farend, &farendlen);

        if (newsock <
0) {
            DEBUGMSGTL(("netsnmp_tcp", "accept failed rc %d errno %d \"%s\"\n",

   etc...
   etc...



Yahoo! oneSearch: Finally, mobile search
that gives answers
, not web links.


--0-1514476936-1182977207=:85688--


--===============1366126857==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
--===============1366126857==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/...et-snmp-coders

--===============1366126857==--