I encountered a compilation error on Alpine Linux version 3.2+ at line 546:
546: struct msghdr msg = { &sa, sizeof(sa), &iov, 1, NULL, 0, 0 };
The failure is due to the changes in the struct msghdr layout. Changing the code to the following resolves the issue:
struct msghdr msg = {
.msg_name = &sa,
.msg_namelen = sizeof(sa),
.msg_iov = &iov,
.msg_iovlen = 1,
.msg_control = NULL,
.msg_controllen = 0,
.msg_flags = 0
};
Also there is a warning at line 305 related to calloc's argument order.
305: struct endpoint *ep = (struct endpoint *) calloc(sizeof(*ep), 1);
Swapping the argument order removes the warning:
struct endpoint *ep = (struct endpoint *) calloc(1, sizeof(*ep));
thanks
I encountered a compilation error on Alpine Linux version 3.2+ at line 546:
The failure is due to the changes in the struct msghdr layout. Changing the code to the following resolves the issue:
Also there is a warning at line 305 related to calloc's argument order.
Swapping the argument order removes the warning:
thanks