mirror of
https://github.com/skywind3000/kcp.git
synced 2026-08-19 06:03:28 +08:00
fixed build issue
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user