Re: symbol "_send_OBSOLETE_" unresolved

Humpolicek <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
> 
> Well, the first step would be to tell us what these changes are  :-)
> 
> If you could post a patch containing the necessary changes,
> we can look at applying them to the appropriate code branches.
> 

Diff of my changes is in attachement. It contains simple replacement of send(*, *, *, *) with sendto(*, *, *, *, NULL, 0) and recv(*, *, *, *) with recfrom(*, *, *, *, NULL, 0) in all net-snmp sources.

Jiri Humpolicek

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
net-snmp-5.4.1.diff (text/plain, 3.8 KB)
diff -r net-snmp-5.4.1/agent/mibgroup/smux/smux.c net-snmp-5.4.1-modified/agent/mibgroup/smux/smux.c
418c418
<         if (send(rptr->sr_fd, buf, len, 0) < 0) {
---
>         if (sendto(rptr->sr_fd, buf, len, 0, NULL, 0) < 0) {
428c428
<                             SMUXMAXPKTSIZE, MSG_PEEK)) <= 0) {
---
>                             SMUXMAXPKTSIZE, MSG_PEEK, NULL, 0)) <= 0) {
467c467
<                len = recv(rptr->sr_fd, buf, len, 0);
---
>                len = recv(rptr->sr_fd, buf, len, 0, NULL, 0);
551c551
<         if ((send(rptr->sr_fd, sout, 3, 0)) < 0) {
---
>         if ((sendto(rptr->sr_fd, sout, 3, 0, NULL, 0)) < 0) {
609c609
<            length = recv(fd, (char *) data, SMUXMAXPKTSIZE, 0);
---
>            length = recv(fd, (char *) data, SMUXMAXPKTSIZE, 0, NULL, 0);
687c687
<        length = recv(fd, (char *) data, SMUXMAXPKTSIZE, MSG_PEEK);
---
>        length = recv(fd, (char *) data, SMUXMAXPKTSIZE, MSG_PEEK, NULL, 0);
715c715
<        length = recv(fd, (char *) data, length, 0);
---
>        length = recv(fd, (char *) data, length, 0, NULL, 0);
915c915
<     if (send(fd, (char *) outpacket, 3, 0) < 0) {
---
>     if (sendto(fd, (char *) outpacket, 3, 0, NULL, 0) < 0) {
1354c1354
<     if (send(sd, (char *) packet, length, 0) < 0) {
---
>     if (sendto(sd, (char *) packet, length, 0, NULL, 0) < 0) {
1366c1366
<         length = recv(sd, (char *) result, SMUXMAXPKTSIZE, MSG_PEEK);
---
>         length = recv(sd, (char *) result, SMUXMAXPKTSIZE, MSG_PEEK, NULL, 0);
1405c1405
<            length = recv(sd, (char *) result, length, 0);
---
>            length = recv(sd, (char *) result, length, 0, NULL, 0);
1808c1808
<     sent = send(sd, (char *) outdata, sizeof outdata, 0);
---
>     sent = sendto(sd, (char *) outdata, sizeof outdata, 0, NULL, 0);
diff -r net-snmp-5.4.1/snmplib/snmpAAL5PVCDomain.c net-snmp-5.4.1-modified/snmplib/snmpAAL5PVCDomain.c
82c82
< 	    rc = recv(t->sock, buf, size, 0);
---
> 	    rc = recv(t->sock, buf, size, 0, NULL, 0);
128c128
< 	    rc = send(t->sock, buf, size, 0);
---
> 	    rc = sendto(t->sock, buf, size, 0, NULL, 0);
diff -r net-snmp-5.4.1/snmplib/snmpCallbackDomain.c net-snmp-5.4.1-modified/snmplib/snmpCallbackDomain.c
192c192
< 	rc = recv(mystuff->pipefds[0], newbuf, 1, 0);
---
> 	rc = recv(mystuff->pipefds[0], newbuf, 1, 0, NULL, 0);
275c275
< 	    rc = send(((netsnmp_callback_info*) other_side->data)->pipefds[1], " ", 1, 0);
---
> 	    rc = sendto(((netsnmp_callback_info*) other_side->data)->pipefds[1], " ", 1, 0, NULL, 0);
312c312
< 	    rc = send(((netsnmp_callback_info*) other_side->data)->pipefds[1], " ", 1, 0);
---
> 	    rc = sendto(((netsnmp_callback_info*) other_side->data)->pipefds[1], " ", 1, 0, NULL, 0);
diff -r net-snmp-5.4.1/snmplib/snmpTCPDomain.c net-snmp-5.4.1-modified/snmplib/snmpTCPDomain.c
112c112
< 	    rc = recv(t->sock, buf, size, 0);
---
> 	    rc = recvfrom(t->sock, buf, size, 0, NULL, 0);
152c152
< 	    rc = send(t->sock, buf, size, 0);
---
> 	    rc = sendto(t->sock, buf, size, 0, NULL, 0);
diff -r net-snmp-5.4.1/snmplib/snmpTCPIPv6Domain.c net-snmp-5.4.1-modified/snmplib/snmpTCPIPv6Domain.c
123c123
< 	    rc = recv(t->sock, buf, size, 0);
---
> 	    rc = recv(t->sock, buf, size, 0, NULL, 0);
160c160
< 	    rc = send(t->sock, buf, size, 0);
---
> 	    rc = sendto(t->sock, buf, size, 0, NULL, 0);
diff -r net-snmp-5.4.1/snmplib/snmpUnixDomain.c net-snmp-5.4.1-modified/snmplib/snmpUnixDomain.c
137c137
<             rc = recv(t->sock, buf, size, 0);
---
>             rc = recvfrom(t->sock, buf, size, 0, NULL, 0);
163c163
<             rc = send(t->sock, buf, size, 0);
---
>             rc = sendto(t->sock, buf, size, 0, NULL, 0);
diff -r net-snmp-5.4.1/snmplib/winpipe.c net-snmp-5.4.1-modified/snmplib/winpipe.c
85c85
< 	int bytessent = send(*sock, (char *) &port, sizeof(port), 0);
---
> 	int bytessent = sendto(*sock, (char *) &port, sizeof(port), 0, NULL, 0);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.