mirror of
https://github.com/skywind3000/kcp.git
synced 2025-04-24 04:10:34 +08:00
fixed build issue
This commit is contained in:
parent
0df053a996
commit
6d2dc91f1f
@ -3,5 +3,5 @@ compiler:
|
||||
- gcc
|
||||
- clang
|
||||
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包
|
||||
int udp_output(const char *buf, int len, ikcpcb *kcp, void *user)
|
||||
{
|
||||
int id = (int)user;
|
||||
vnet->send(id, buf, len);
|
||||
union { int id; void *ptr; } parameter;
|
||||
parameter.ptr = user;
|
||||
vnet->send(parameter.id, buf, len);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user