Closed plasmoduck closed 3 years ago
Have not tested kirc on FreeBSD before but the fix seems pretty straight forward. From what i have read, types.h
and socket.h
need to be explicitly declared:
# include <sys/types.h>
# include <sys/socket.h>
I’ll try to get a FreeBSD VM up and running this week to verify.
Awesome that worked. I'll close this. Thanks
kirc git:(master) make cc -O2 -pipe -c kirc.c kirc.c:426:22: error: use of undeclared identifier 'AF_UNSPEC' .ai_family = AF_UNSPEC, ^ kirc.c:427:24: error: use of undeclared identifier 'SOCK_STREAM' .ai_socktype = SOCK_STREAM ^ kirc.c:437:21: warning: implicit declaration of function 'socket' is invalid in C99 [-Wimplicit-function-declaration] if ((conn = socket(p->ai_family, p->ai_socktype, p->ai_protocol)) == -1) { ^ kirc.c:441:13: warning: implicit declaration of function 'connect' is invalid in C99 [-Wimplicit-function-declaration] if (connect(conn, p->ai_addr, p->ai_addrlen) == -1) { ^ 2 warnings and 2 errors generated. *** Error code 1
Stop. make: stopped in /usr/home/cjg/suckless/kirc