simple-webserver icon indicating copy to clipboard operation
simple-webserver copied to clipboard

Didn't work

Open Skycader opened this issue 5 years ago • 0 comments

root@vodri:/mycpp/simple-webserver# make gcc server.c -o server server.c:49:6: warning: conflicting types for built-in function 'log'; expected 'double(double)' [-Wbuiltin-declaration-mismatch] 49 | void log(int type, char *s1, char *s2, int num) | ^~~ server.c:20:1: note: 'log' is declared in header '<math.h>' 19 | #include <arpa/inet.h> +++ |+#include <math.h> 20 | server.c: In function 'main': server.c:193:65: warning: passing argument 3 of 'accept' from incompatible pointer type [-Wincompatible-pointer-types] 193 | if((socketfd = accept(listenfd, (struct sockaddr *)&cli_addr, &length)) < 0) | ^~~~~~~ | | | size_t * {aka long unsigned int *} In file included from server.c:17: /usr/include/x86_64-linux-gnu/sys/socket.h:233:28: note: expected 'socklen_t * restrict' {aka 'unsigned int * restrict'} but argument is of type 'size_t *' {aka 'long unsigned int *'} 233 | socklen_t *__restrict __addr_len); | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ root@vodri:/mycpp/simple-webserver#

Skycader avatar Aug 22 '20 18:08 Skycader