fixed c99 bug
This commit is contained in:
parent
30b1e97483
commit
3dadd1ef49
3
Makefile
3
Makefile
|
@ -1,6 +1,5 @@
|
||||||
|
|
||||||
CFLAGS=-g -Wall -Wextra
|
CFLAGS=-g -Wall -Wextra -std=gnu99
|
||||||
# -std=c99 # c99 breaks some of your code xD
|
|
||||||
|
|
||||||
|
|
||||||
all: bin/netsl
|
all: bin/netsl
|
||||||
|
|
2
net.c
2
net.c
|
@ -106,7 +106,7 @@ int run_client(const struct prog_info *pinfo, void (*framecallback)(long) ) {
|
||||||
|
|
||||||
struct addrinfo *info;
|
struct addrinfo *info;
|
||||||
int sockfd;
|
int sockfd;
|
||||||
char s[INET6_ADDRSTRLEN];
|
//char s[INET6_ADDRSTRLEN];
|
||||||
for (info = servinfo; info != NULL; info = info->ai_next) {
|
for (info = servinfo; info != NULL; info = info->ai_next) {
|
||||||
if ((sockfd = socket(info->ai_family, info->ai_socktype, info->ai_protocol)) == -1) {
|
if ((sockfd = socket(info->ai_family, info->ai_socktype, info->ai_protocol)) == -1) {
|
||||||
perror("sock");
|
perror("sock");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user