// This example client has no file descriptors of its own,
// but a real application would call FD_SET to add them to the set here
FD_ZERO(&readfds);
// This example client has no file descriptors of its own,
// but a real application would call FD_SET to add them to the set here
FD_ZERO(&readfds);
// 2. Set up the timeout.
// This example client has no other work it needs to be doing,
// so we set an effectively infinite timeout
// 2. Set up the timeout.
// This example client has no other work it needs to be doing,
// so we set an effectively infinite timeout
- mDNSPosixGetFDSet(m, &nfds, &readfds, &timeout);
+ mDNSPosixGetFDSet(m, &nfds, &readfds, &writefds, &timeout);
// 4. Call select as normal
verbosedebugf("select(%d, %d.%06d)", nfds, timeout.tv_sec, timeout.tv_usec);
// 4. Call select as normal
verbosedebugf("select(%d, %d.%06d)", nfds, timeout.tv_sec, timeout.tv_usec);
- result = select(nfds, &readfds, NULL, NULL, &timeout);
+ result = select(nfds, &readfds, &writefds, NULL, &timeout);
// 6. This example client has no other work it needs to be doing,
// but a real client would do its work here
// 6. This example client has no other work it needs to be doing,
// but a real client would do its work here