summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott <scott@paragonie.com>2015-10-14 15:16:59 -0400
committerXinchen Hui <laruence@gmail.com>2015-12-01 10:33:33 +0800
commit00e3b7614e5f6d845f1135d2e559638be525af24 (patch)
treeddfdd718b6cb88d7df4dd6505296729c9dd5302a
parent1b277548888ee788d4af09b1cd993873416fa983 (diff)
downloadphp-git-00e3b7614e5f6d845f1135d2e559638be525af24.tar.gz
Update random.c
Ref: https://github.com/jedisct1/libsodium/commit/beb826f6fd173cff4473c8b7614033dbd4803500
-rw-r--r--ext/standard/random.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/standard/random.c b/ext/standard/random.c
index 70568799de..bf3a2bc321 100644
--- a/ext/standard/random.c
+++ b/ext/standard/random.c
@@ -144,8 +144,8 @@ static int php_random_bytes(void *bytes, size_t size)
}
/* Does the file exist and is it a character device? */
if (fstat(fd, &st) != 0 ||
-# ifdef S_IFNAM
- !(S_IFNAM(st.st_mode) || S_ISCHR(st.st_mode))
+# ifdef S_ISNAM
+ !(S_ISNAM(st.st_mode) || S_ISCHR(st.st_mode))
# else
!S_ISCHR(st.st_mode)
# endif