| Summary: | x11-toolkits/plib unable to connect to network | ||
|---|---|---|---|
| Product: | Ports & Packages | Reporter: | Martin Laabs <spamtrap> |
| Component: | Individual Port(s) | Assignee: | Dmitry Marakasov <amdmi3> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | Latest | ||
| Hardware: | Any | ||
| OS: | Any | ||
Responsible Changed From-To: freebsd-ports-bugs->amdmi3 I'll take it. amdmi3 2010-03-15 14:35:32 UTC
FreeBSD ports repository
Modified files:
x11-toolkits/plib Makefile
Added files:
x11-toolkits/plib/files patch-src-net-netSocket.cxx
patch-src-net-netSocket.h
Log:
- Add a patch to fix network-related functionality
PR: 144575 ([1]), 138786 ([2])
Submitted by: Ganael Laplanche <ganael.laplanche@martymac.com> [1],
Martin Laabs <spamtrap@martinlaabs.de> [2]
Patch by: Ganael Laplanche <ganael.laplanche@martymac.com>
Revision Changes Path
1.40 +1 -1 ports/x11-toolkits/plib/Makefile
1.1 +21 -0 ports/x11-toolkits/plib/files/patch-src-net-netSocket.cxx (new)
1.1 +27 -0 ports/x11-toolkits/plib/files/patch-src-net-netSocket.h (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
State Changed From-To: open->closed Should be fixed by ports/144575 |
Every program which uses the netSocket class of plib seems to be unable to connect to the network. In my opinion this is because of these lines in netSocket.h: class netAddress { /* DANGER!!! This MUST match 'struct sockaddr_in' exactly! */ short sin_family ; unsigned short sin_port ; unsigned int sin_addr ; char sin_zero [ 8 ] ; [...] This data structure does not match the sockaddr_in of freebsd. How-To-Repeat: #include <plib/netSocket.h> #include <iostream.h> main() { char msg[50]="blablabla\n"; unsigned int len=25; const char host[]="127.0.0.1"; int port = 5000; netInit (); netSocket *sock = new netSocket () ; cout << "open " << sock -> open ( false ) << "\n"; cout << "blocking " << sock -> setBlocking(false) << "\n"; cout << "connect " << sock -> connect ( host, port ) << "\n" ; sock -> send ( msg, len, 0 ); } g++ -I/usr/local/include test.c -lplibnet -L /usr/local/lib