summaryrefslogtreecommitdiffstats
path: root/contrib/bind9/lib/isc/unix/entropy.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/bind9/lib/isc/unix/entropy.c')
-rw-r--r--contrib/bind9/lib/isc/unix/entropy.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/contrib/bind9/lib/isc/unix/entropy.c b/contrib/bind9/lib/isc/unix/entropy.c
index 5050663..d52849a 100644
--- a/contrib/bind9/lib/isc/unix/entropy.c
+++ b/contrib/bind9/lib/isc/unix/entropy.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2006 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: entropy.c,v 1.60.2.3.8.11 2005/07/12 05:47:43 marka Exp $ */
+/* $Id: entropy.c,v 1.60.2.3.8.14 2006/03/02 23:29:17 marka Exp $ */
/*
* This is the system depenedent part of the ISC entropy API.
@@ -127,7 +127,7 @@ get_from_usocketsource(isc_entropysource_t *source, isc_uint32_t desired) {
switch ( source->sources.usocket.status ) {
case isc_usocketsource_ndesired:
buf[0] = ndesired;
- if ((n = send(fd, buf, 1, 0)) < 0) {
+ if ((n = sendto(fd, buf, 1, 0, NULL, 0)) < 0) {
if (errno == EWOULDBLOCK || errno == EINTR ||
errno == ECONNRESET)
goto out;
@@ -142,7 +142,7 @@ get_from_usocketsource(isc_entropysource_t *source, isc_uint32_t desired) {
case isc_usocketsource_connected:
buf[0] = 1;
buf[1] = ndesired;
- if ((n = send(fd, buf, 2, 0)) < 0) {
+ if ((n = sendto(fd, buf, 2, 0, NULL, 0)) < 0) {
if (errno == EWOULDBLOCK || errno == EINTR ||
errno == ECONNRESET)
goto out;
@@ -159,12 +159,12 @@ get_from_usocketsource(isc_entropysource_t *source, isc_uint32_t desired) {
/*FALLTHROUGH*/
case isc_usocketsource_wrote:
- if (recv(fd, buf, 1, 0) != 1) {
+ if (recvfrom(fd, buf, 1, 0, NULL, NULL) != 1) {
if (errno == EAGAIN) {
/*
* The problem of EAGAIN (try again
* later) is a major issue on HP-UX.
- * Solaris actually tries the recv
+ * Solaris actually tries the recvfrom
* call again, while HP-UX just dies.
* This code is an attempt to let the
* entropy pool fill back up (at least
@@ -503,7 +503,7 @@ isc_entropy_createfilesource(isc_entropy_t *ent, const char *fname) {
if (S_ISSOCK(_stat.st_mode))
is_usocket = ISC_TRUE;
#endif
-#if defined(S_ISFIFO)
+#if defined(S_ISFIFO) && defined(sun)
if (S_ISFIFO(_stat.st_mode))
is_usocket = ISC_TRUE;
#endif
OpenPOWER on IntegriCloud