aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--common.h14
-rw-r--r--librecrypt_rng_.c8
2 files changed, 12 insertions, 10 deletions
diff --git a/common.h b/common.h
index e020e11..bc04b44 100644
--- a/common.h
+++ b/common.h
@@ -16,19 +16,11 @@
#endif
#include "librecrypt.h"
-#if defined(__linux__)
-# include <sys/auxv.h>
-# include <sys/random.h>
-#endif
-#include <sys/mman.h>
-#include <fcntl.h>
#include <errno.h>
#include <limits.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
-#include <time.h>
-#include <unistd.h>
#if defined(__GNUC__)
@@ -44,8 +36,8 @@
#define NONSTRING
#if defined(__GNUC__)
# if __GNUC__ >= 8 || defined(__clang__)
-# undef NONSTRING
-# define NONSTRING __attribute__((__nonstring__))
+# undef NONSTRING
+# define NONSTRING __attribute__((__nonstring__))
# endif
#endif
@@ -354,6 +346,8 @@ struct pepper *librecrypt_get_pepper_(LIBRECRYPT_CONTEXT *ctx, enum librecrypt_h
# include <sys/wait.h>
# include <setjmp.h>
# include <signal.h>
+# include <stdio.h>
+# include <stdlib.h>
# include <string.h>
# include <unistd.h>
diff --git a/librecrypt_rng_.c b/librecrypt_rng_.c
index 4c6d5dc..d645f82 100644
--- a/librecrypt_rng_.c
+++ b/librecrypt_rng_.c
@@ -1,5 +1,13 @@
/* See LICENSE file for copyright and license details. */
#include "common.h"
+#if defined(__linux__)
+# include <sys/auxv.h>
+# include <sys/random.h>
+#endif
+#include <sys/mman.h>
+#include <fcntl.h>
+#include <time.h>
+#include <unistd.h>
#ifndef TEST