]> granicus.if.org Git - php/commitdiff
Update random.c
authorScott <scott@paragonie.com>
Wed, 14 Oct 2015 19:16:59 +0000 (15:16 -0400)
committerScott <scott@paragonie.com>
Wed, 14 Oct 2015 19:16:59 +0000 (15:16 -0400)
Ref: https://github.com/jedisct1/libsodium/commit/beb826f6fd173cff4473c8b7614033dbd4803500

ext/standard/random.c

index f46c4e0a14cf0a76db05c72ff9a6457f8d4caf07..9b6b1c89c392bbd8fd323391b4e6443a9f157571 100644 (file)
@@ -141,8 +141,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