util/rand_xor: add missing include statements
authorNicolas Dechesne <nicolas.dechesne@linaro.org>
Thu, 1 Jun 2017 10:13:18 +0000 (12:13 +0200)
committerEric Engestrom <eric.engestrom@imgtec.com>
Thu, 1 Jun 2017 13:26:12 +0000 (14:26 +0100)
Fixes for:

src/util/rand_xor.c:60:13: error: implicit declaration of function 'open' [-Werror=implicit-function-declaration]
    int fd = open("/dev/urandom", O_RDONLY);
             ^~~~
src/util/rand_xor.c:60:34: error: 'O_RDONLY' undeclared (first use in this function)
    int fd = open("/dev/urandom", O_RDONLY);
                                  ^~~~~~~~

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
src/util/rand_xor.c

index de05fa64b3cd898ecf555bcb19d0c92978698dd2..de04bbc284f7a5e75fba95b284b0c74dc1734437 100644 (file)
@@ -25,6 +25,7 @@
 #if defined(__linux__)
 #include <sys/file.h>
 #include <unistd.h>
+#include <fcntl.h>
 #else
 #include <time.h>
 #endif