From d0c399570e6bcf85f9eca3f3e2e9850e35c7d598 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Sun, 10 Jan 2010 11:12:07 +0000 Subject: [PATCH] Added LWIP_RAND() define --- ports/unix/include/arch/cc.h | 4 +++- ports/win32/include/arch/cc.h | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ports/unix/include/arch/cc.h b/ports/unix/include/arch/cc.h index 9766311..4645478 100644 --- a/ports/unix/include/arch/cc.h +++ b/ports/unix/include/arch/cc.h @@ -80,5 +80,7 @@ typedef unsigned long mem_ptr_t; #define LWIP_PLATFORM_ASSERT(x) do {printf("Assertion \"%s\" failed at line %d in %s\n", \ x, __LINE__, __FILE__); fflush(NULL); abort();} while(0) - + +#define LWIP_RAND() ((u32_t)rand()) + #endif /* __ARCH_CC_H__ */ diff --git a/ports/win32/include/arch/cc.h b/ports/win32/include/arch/cc.h index ebeec7b..4a889e3 100644 --- a/ports/win32/include/arch/cc.h +++ b/ports/win32/include/arch/cc.h @@ -103,4 +103,6 @@ typedef u32_t sys_prot_t; u32_t dns_lookup_external_hosts_file(const char *name); +#define LWIP_RAND() ((u32_t)rand()) + #endif /* __ARCH_CC_H__ */