提交 9b249aa1 编写于 作者: Y YOUR_NAME

fix: lwip使用rand生成随机端口固定

由于srand设置时间种子时未使用入参,导致时间种子设置失败,
引发rand生成随机端口固定

close: #I3V8WS
Signed-off-by: Nzff <zhangfanfan2@huawei.com>
Change-Id: Idabed287fa7584ae9c6f2cc966afa35032e24a70
上级 3ced2e87
......@@ -32,11 +32,9 @@
#include <stdlib.h>
#include <stdint.h>
static uint64_t seed;
void srand(unsigned s)
{
return srandom(seed);
return srandom(s);
}
int rand(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册