fixed build issue
This commit is contained in:
parent
0df053a996
commit
6d2dc91f1f
@ -3,5 +3,5 @@ compiler:
|
|||||||
- gcc
|
- gcc
|
||||||
- clang
|
- clang
|
||||||
script:
|
script:
|
||||||
- gcc -O3 test.cpp -o test
|
- $CC -O3 test.cpp -o test
|
||||||
|
|
||||||
|
5
test.cpp
5
test.cpp
@ -20,8 +20,9 @@ LatencySimulator *vnet;
|
|||||||
// 模拟网络:模拟发送一个 udp包
|
// 模拟网络:模拟发送一个 udp包
|
||||||
int udp_output(const char *buf, int len, ikcpcb *kcp, void *user)
|
int udp_output(const char *buf, int len, ikcpcb *kcp, void *user)
|
||||||
{
|
{
|
||||||
int id = (int)user;
|
union { int id; void *ptr; } parameter;
|
||||||
vnet->send(id, buf, len);
|
parameter.ptr = user;
|
||||||
|
vnet->send(parameter.id, buf, len);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user