Learn C, C++ Concepts
The following changes will make the compiler happy :}I used gcc='gcc -O3 -ggdb -std=c99 -Wall -Wextra -D_BSD_SOURCE 'From: gcc htons-example.c -o htons-example To: gcc -D_BSD_SOURCE htons-example.c -o htons-exampleFrom: int len_inet;To: unsigned int len_inet;From: z = getsockname(s, (struct sockaddr *)&adr_inet, &len_inet);To: z = getsockname(s, (struct sockaddr *restrict)&adr_inet, &len_inet);Thanks for the nice example code - Enjoyed!
The following changes will make the compiler happy :}
ReplyDeleteI used gcc='gcc -O3 -ggdb -std=c99 -Wall -Wextra -D_BSD_SOURCE '
From: gcc htons-example.c -o htons-example
To: gcc -D_BSD_SOURCE htons-example.c -o htons-example
From: int len_inet;
To: unsigned int len_inet;
From: z = getsockname(s, (struct sockaddr *)&adr_inet, &len_inet);
To: z = getsockname(s, (struct sockaddr *restrict)&adr_inet, &len_inet);
Thanks for the nice example code - Enjoyed!