mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-27 18:25:05 +00:00
This patch introduces HOST_CPPFLAGS to be used for all objects being compiled with HOSTCC rather then the target compiler. Since glibc is not linked into the EC, no glibc include files should be included in the EC code base. Hence, create local definitions for clock_t and wchar_t that match what the glibc include would have done, and remove some unneeded includes. Due to very eager optimization, we have to give gcc a little notch to not kick out memset. Signed-off-by: Stefan Reinauer <reinauer@chromium.org> BUG=chrome-os-partner:43025 BUG=chrome-os-partner:49517 BRANCH=none TEST=compile tested Change-Id: Idf3a2881fa8352756b0927b09c6a97473358f239 Reviewed-on: https://chromium-review.googlesource.com/322435 Commit-Ready: Patrick Georgi <pgeorgi@chromium.org> Tested-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
32 lines
636 B
C
32 lines
636 B
C
/* Copyright 2015 The Chromium OS Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
#ifndef __EC_INCLUDE_TRNG_H
|
|
#define __EC_INCLUDE_TRNG_H
|
|
|
|
#include <stddef.h>
|
|
|
|
/**
|
|
* Initialize the true random number generator.
|
|
*
|
|
* Not supported by all platforms.
|
|
**/
|
|
void init_trng(void);
|
|
|
|
/**
|
|
* Retrieve a 32 bit random value.
|
|
*
|
|
* Not supported on all platforms.
|
|
**/
|
|
uint32_t rand(void);
|
|
|
|
/**
|
|
* Output len random bytes into buffer.
|
|
*
|
|
* Not supported on all platforms.
|
|
**/
|
|
void rand_bytes(void *buffer, size_t len);
|
|
|
|
#endif /* __EC_INCLUDE_TRNG_H */
|