Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- user@networkslab:~/akimovamaria/simple_udp/server$ make
- Scanning dependencies of target server_linux
- [ 50%] Building C object CMakeFiles/server_linux.dir/main.c.o
- /home/user/akimovamaria/simple_udp/server/main.c: In function ‘main’:
- /home/user/akimovamaria/simple_udp/server/main.c:50:5: error: unknown type name ‘pthtred_t’; did you mean ‘pthread_t’?
- pthtred_t controling;
- ^~~~~~~~~
- pthread_t
- /home/user/akimovamaria/simple_udp/server/main.c:75:29: warning: passing argument 1 of ‘pthread_create’ from incompatible pointer type [-Wincompatible-pointer-types]
- status = pthread_create(&controling, NULL, thread_control, NULL);
- ^
- In file included from /home/user/akimovamaria/simple_udp/server/main.c:7:0:
- /usr/include/pthread.h:234:12: note: expected ‘pthread_t * restrict {aka long unsigned int * restrict}’ but argument is of type ‘int *’
- extern int pthread_create (pthread_t *__restrict __newthread,
- ^~~~~~~~~~~~~~
- /home/user/akimovamaria/simple_udp/server/main.c:93:20: error: ‘newsockfd’ undeclared (first use in this function); did you mean ‘sockfd’?
- thread_request(newsockfd);
- ^~~~~~~~~
- sockfd
- /home/user/akimovamaria/simple_udp/server/main.c:93:20: note: each undeclared identifier is reported only once for each function it appears in
- /home/user/akimovamaria/simple_udp/server/main.c:48:13: warning: variable ‘n’ set but not used [-Wunused-but-set-variable]
- ssize_t n;
- ^
- /home/user/akimovamaria/simple_udp/server/main.c:43:14: warning: unused parameter ‘argc’ [-Wunused-parameter]
- int main(int argc, char *argv[]) {
- ^~~~
- /home/user/akimovamaria/simple_udp/server/main.c:43:26: warning: unused parameter ‘argv’ [-Wunused-parameter]
- int main(int argc, char *argv[]) {
- ^~~~
- /home/user/akimovamaria/simple_udp/server/main.c: In function ‘connection_handler’:
- /home/user/akimovamaria/simple_udp/server/main.c:103:89: error: ‘clilen’ undeclared (first use in this function); did you mean ‘strlen’?
- n = sendto(sockfd, "I got your message", 18, 0, (struct sockaddr*) &cli_addr_local, clilen); // sendto
- ^~~~~~
- strlen
- /home/user/akimovamaria/simple_udp/server/main.c:103:16: warning: passing argument 1 of ‘sendto’ makes integer from pointer without a cast [-Wint-conversion]
- n = sendto(sockfd, "I got your message", 18, 0, (struct sockaddr*) &cli_addr_local, clilen); // sendto
- ^~~~~~
- In file included from /usr/include/netinet/in.h:23:0,
- from /usr/include/netdb.h:27,
- from /home/user/akimovamaria/simple_udp/server/main.c:4:
- /usr/include/x86_64-linux-gnu/sys/socket.h:152:16: note: expected ‘int’ but argument is of type ‘void *’
- extern ssize_t sendto (int __fd, const void *__buf, size_t __n,
- ^~~~~~
- CMakeFiles/server_linux.dir/build.make:62: recipe for target 'CMakeFiles/server_linux.dir/main.c.o' failed
- make[2]: *** [CMakeFiles/server_linux.dir/main.c.o] Error 1
- CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/server_linux.dir/all' failed
- make[1]: *** [CMakeFiles/server_linux.dir/all] Error 2
- Makefile:83: recipe for target 'all' failed
- make: *** [all] Error 2
Add Comment
Please, Sign In to add comment