mirror of
https://github.com/berlin-open-wireless-lab/DAWN.git
synced 2025-03-09 15:40:12 +00:00
Fix tcpsocket.c compile error in OpenWRT v18.06.2
Fix compile error when compiling with OpenWrt v18.06.2 build system. ``` cd /home/openwrt/openwrt/build_dir/target-x86_64_musl/dawn-a9d5b1ee/src && /home/openwrt/openwrt/staging_dir/toolchain-x86_64_gcc-7.3.0_musl/bin/x86_64-openwrt-linux-musl-gcc -I/home/openwrt/openwrt/build_dir/target-x86_64_musl/dawn-a9d5b1ee/src/include -Os -pipe -march=btver2 -mtune=btver2 -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -iremap/home/openwrt/openwrt/build_dir/target-x86_64_musl/dawn-a9d5b1ee:dawn-a9d5b1ee -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -DNDEBUG -Os -Wall -Werror --std=gnu99 -Wmissing-declarations -Wno-unknown-warning-option -Wno-format-truncation -o CMakeFiles/dawn.dir/network/tcpsocket.c.o -c /home/openwrt/openwrt/build_dir/target-x86_64_musl/dawn-a9d5b1ee/src/network/tcpsocket.c /home/openwrt/openwrt/build_dir/target-x86_64_musl/dawn-a9d5b1ee/src/network/tcpsocket.c: In function 'client_not_be_used_read_cb': /home/openwrt/openwrt/build_dir/target-x86_64_musl/dawn-a9d5b1ee/src/network/tcpsocket.c:159:19: error: format '%d' expects argument of type 'int', but argument 2 has type 'size_t {aka long unsigned int}' [-Werror=format=] printf("Read %d bytes from SSL connection: %s\n", len, buf); ~^ %ld ```
This commit is contained in:
parent
a9d5b1eeee
commit
17b02ad07f
1 changed files with 2 additions and 2 deletions
|
@ -156,7 +156,7 @@ static void client_not_be_used_read_cb(struct ustream *s, int bytes) {
|
||||||
|
|
||||||
len = ustream_read(s, buf, sizeof(buf));
|
len = ustream_read(s, buf, sizeof(buf));
|
||||||
buf[len] = '\0';
|
buf[len] = '\0';
|
||||||
printf("Read %d bytes from SSL connection: %s\n", len, buf);
|
printf("Read %ld bytes from SSL connection: %s\n", len, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void connect_cb(struct uloop_fd *f, unsigned int events) {
|
static void connect_cb(struct uloop_fd *f, unsigned int events) {
|
||||||
|
@ -285,4 +285,4 @@ void print_tcp_array() {
|
||||||
printf("Conenctin to Port: %d, Connected: %s\n", con->sock_addr.sin_port, con->connected ? "True" : "False");
|
printf("Conenctin to Port: %d, Connected: %s\n", con->sock_addr.sin_port, con->connected ? "True" : "False");
|
||||||
}
|
}
|
||||||
printf("------------------\n");
|
printf("------------------\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue