From: Yu Watanabe Date: Thu, 6 Dec 2018 05:47:47 +0000 (+0100) Subject: missing: move rand related definitions to missing_random.h X-Git-Tag: v240~126^2~12 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b19bb11142214b68ba8c5a367fe97117a2f33e94;p=thirdparty%2Fsystemd.git missing: move rand related definitions to missing_random.h --- diff --git a/src/basic/meson.build b/src/basic/meson.build index 3730930c7f6..8fc7665a913 100644 --- a/src/basic/meson.build +++ b/src/basic/meson.build @@ -108,6 +108,7 @@ basic_sources = files(''' missing_mman.h missing_network.h missing_prctl.h + missing_random.h missing_resource.h missing_securebits.h missing_socket.h diff --git a/src/basic/missing.h b/src/basic/missing.h index 850709baace..0651a397c94 100644 --- a/src/basic/missing.h +++ b/src/basic/missing.h @@ -9,14 +9,6 @@ #include #include -#ifndef GRND_NONBLOCK -#define GRND_NONBLOCK 0x0001 -#endif - -#ifndef GRND_RANDOM -#define GRND_RANDOM 0x0002 -#endif - #ifndef FS_NOCOW_FL #define FS_NOCOW_FL 0x00800000 #endif @@ -133,6 +125,7 @@ #include "missing_mman.h" #include "missing_network.h" #include "missing_prctl.h" +#include "missing_random.h" #include "missing_resource.h" #include "missing_socket.h" #include "missing_timerfd.h" diff --git a/src/basic/missing_random.h b/src/basic/missing_random.h new file mode 100644 index 00000000000..2e76031b325 --- /dev/null +++ b/src/basic/missing_random.h @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + +#if USE_SYS_RANDOM_H +# include +#else +# include +#endif + +#ifndef GRND_NONBLOCK +#define GRND_NONBLOCK 0x0001 +#endif + +#ifndef GRND_RANDOM +#define GRND_RANDOM 0x0002 +#endif