From 33c2aa21c09dc970759f03b1ef570bacb36afb66 Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <schaller@strw.leidenuniv.nl> Date: Fri, 19 Jul 2019 17:38:26 +0200 Subject: [PATCH] Corrected the missing inclusion of <string.h> in random.h that is needed for memcpy(). --- examples/main.c | 1 - src/random.h | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/examples/main.c b/examples/main.c index fa4186fc0b..09deb8fe9c 100644 --- a/examples/main.c +++ b/examples/main.c @@ -1099,7 +1099,6 @@ int main(int argc, char *argv[]) { if (s.periodic) gravity_exact_force_ewald_init(e.s->dim[0]); #endif - if (!restart) { #ifdef WITH_MPI diff --git a/src/random.h b/src/random.h index d51885a92f..fb33bb2ef5 100644 --- a/src/random.h +++ b/src/random.h @@ -24,8 +24,13 @@ #include "../config.h" /* Standard header */ +#include <errno.h> +#include <ieee754.h> +#include <limits.h> #include <stdint.h> #include <stdlib.h> +#include <string.h> +#include <sys/types.h> /** * @brief The categories of random number generated. @@ -50,11 +55,6 @@ enum random_number_type { random_number_BH_swallow = 4947009007LL }; -#include <errno.h> -#include <ieee754.h> -#include <limits.h> -#include <sys/types.h> - /* Inline the default RNG functions to avoid costly function calls. These functions are minor modifications, but functional equivalents, of their glibc counterparts. */ -- GitLab