Skip to content

Didn't work #2

Description

@Skycader

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#

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions