mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-05 22:29:49 +00:00
Add lwip_port_rand() to unix port
This commit is contained in:
parent
cbc80a0920
commit
aa4668cc47
@ -56,7 +56,8 @@
|
|||||||
#define LWIP_ERRNO_STDINCLUDE 1
|
#define LWIP_ERRNO_STDINCLUDE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define LWIP_RAND() ((u32_t)rand())
|
extern unsigned int lwip_port_rand(void);
|
||||||
|
#define LWIP_RAND() (lwip_port_rand())
|
||||||
|
|
||||||
/* different handling for unit test, normally not needed */
|
/* different handling for unit test, normally not needed */
|
||||||
#ifdef LWIP_NOASSERT_ON_ERROR
|
#ifdef LWIP_NOASSERT_ON_ERROR
|
||||||
|
@ -68,6 +68,12 @@
|
|||||||
#include "lwip/stats.h"
|
#include "lwip/stats.h"
|
||||||
#include "lwip/tcpip.h"
|
#include "lwip/tcpip.h"
|
||||||
|
|
||||||
|
u32_t
|
||||||
|
lwip_port_rand(void)
|
||||||
|
{
|
||||||
|
return rand();
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
get_monotonic_time(struct timespec *ts)
|
get_monotonic_time(struct timespec *ts)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user