From 8a6021268e83b8712acc8d73ab2f4073ee402245 Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Tue, 4 Aug 2020 17:29:31 +0200 Subject: introduced NETWORK_BUFFER_MAX_SIZE to replace BUFSIZ as this might change depending on the arch/libc used Signed-off-by: Toni Uhlig --- examples/c-json-stdout/c-json-stdout.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/c-json-stdout') diff --git a/examples/c-json-stdout/c-json-stdout.c b/examples/c-json-stdout/c-json-stdout.c index c58ef6907..ff84a6411 100644 --- a/examples/c-json-stdout/c-json-stdout.c +++ b/examples/c-json-stdout/c-json-stdout.c @@ -16,7 +16,7 @@ int main(void) int sockfd = socket(AF_INET, SOCK_STREAM, 0); struct sockaddr_in remote_addr = {}; socklen_t remote_addrlen = sizeof(remote_addr); - uint8_t buf[BUFSIZ]; + uint8_t buf[NETWORK_BUFFER_MAX_SIZE]; //size_t buf_used = 0; //unsigned long long int buf_wanted = 0; @@ -45,7 +45,7 @@ int main(void) break; } - printf("RECV[%zd]: '%.*s'\n", bytes_read, (int) bytes_read, buf); + printf("RECV[%zd]: '%.*s'\n\n", bytes_read, (int) bytes_read, buf); } return 0; -- cgit v1.2.3