esp-idf/components/linux/include/sys/random.h
Ivan Grokhotkov 7b8f69404f
feat(linux): provide getrandom implementation for macOS
This makes getrandom(2) usable when compiling with IDF_TARGET=linux
on a macOS host.
2023-12-19 15:11:32 +01:00

16 lines
279 B
C

/*
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include_next "sys/random.h"
#if __APPLE__
#include <stddef.h>
int getrandom(void *buf, size_t buflen, unsigned int flags);
#endif // __APPLE__