#else
if (strerror_r(errnum, buf, buflen) != 0) {
snprintf(buf, buflen, "Error #%i; "
#else
if (strerror_r(errnum, buf, buflen) != 0) {
snprintf(buf, buflen, "Error #%i; "
if (recv(fd, buffer, sizeof(buffer), MSG_PEEK | MSG_DONTWAIT) == 0) {
/* if recv returns zero (even though poll() said there is data to be
* read), that means the connection has been closed */
if (recv(fd, buffer, sizeof(buffer), MSG_PEEK | MSG_DONTWAIT) == 0) {
/* if recv returns zero (even though poll() said there is data to be
* read), that means the connection has been closed */