2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

mask of mode format bits and compare result

This commit is contained in:
Mark Andrews
2002-06-05 02:20:59 +00:00
parent 5ddbaad44e
commit 918102a7d2

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: entropy.c,v 1.66 2002/05/30 04:21:15 marka Exp $ */
/* $Id: entropy.c,v 1.67 2002/06/05 02:20:59 marka Exp $ */
/*
* This is the system depenedent part of the ISC entropy API.
@@ -490,9 +490,9 @@ isc_entropy_createfilesource(isc_entropy_t *ent, const char *fname) {
* the program to look at an actual FIFO as its source of
* entropy.
*/
if ((_stat.st_mode & S_IFSOCK) != 0
if ((_stat.st_mode & S_IFMT) == S_IFSOCK
#ifdef _SOCKET_IS_FIFO
|| (_stat.st_mode & S_IFIFO) != 0
|| (_stat.st_mode & S_IFMT) == S_IFIFO
#endif
) {
fd = socket(PF_UNIX, SOCK_STREAM, 0);