Closed dreibh closed 4 years ago
On Wed, May 15, 2019 at 08:03:57AM -0700, Thomas Dreibholz wrote:
Building libneat fails under Ubuntu 19.04 (disco) and 19.10 (eoan, current development version):
/<
>/neat_core.c: In function ‘nt_sctp_init_events’: /< >/neat_core.c:5961:9: error: ‘SCTP_SEND_FAILED_EVENT’ undeclared (first use in this function); did you mean ‘SCTP_SEND_FAILED’? SCTP_SEND_FAILED_EVENT, ^ ~~~~~ SCTP_SEND_FAILED
Is neat using usrsctp or the linux kernel implementation? Sounds like the former as kernel never had this symbol as specified, or this is new code on neat (didn't check).
What it has is what the compiler suggested, SCTP_SEND_FAILED, and it has the same meaning. Seems the kernel could use a #define to do the compatibility.
/<
>/neat_core.c:5961:9: note: each undeclared identifier is reported only once for each function it appears in /< >/neat_core.c:5966:25: error: ‘SCTP_FUTURE_ASSOC’ undeclared (first use in this function); did you mean ‘SCTP_RESET_ASSOC’? event.se_assoc_id = SCTP_FUTURE_ASSOC; ^ ~~~~ SCTP_RESET_ASSOC
But here you would need a newer kernel. SCTP_FUTURE_ASOC was only added on commit 80df2704a375b, v5.1.
The code uses the Linux kernel implementation. I had a short look for the issue: newer kernels do not have SCTP_FUTURE_ASSOC and SCTP_SEND_FAILED_EVENT defined. SCTP_SEND_FAILED_EVENT has been renamed to SCTP_SEND_FAILED. I wrote a small patch -> pull request: https://github.com/NEAT-project/neat/pull/451 .
Building libneat fails under Ubuntu 19.04 (disco) and 19.10 (eoan, current development version):
/<>/neat_core.c: In function ‘nt_sctp_init_events’:
/<>/neat_core.c:5961:9: error: ‘SCTP_SEND_FAILED_EVENT’ undeclared (first use in this function); did you mean ‘SCTP_SEND_FAILED’?
SCTP_SEND_FAILED_EVENT,
^>/neat_core.c:5961:9: note: each undeclared identifier is reported only once for each function it appears in
/<>/neat_core.c:5966:25: error: ‘SCTP_FUTURE_ASSOC’ undeclared (first use in this function); did you mean ‘SCTP_RESET_ASSOC’?
event.se_assoc_id = SCTP_FUTURE_ASSOC;
^>/neat_core.c:5966:23: error: assignment to ‘sctp_assoc_t’ {aka ‘int’} from ‘uint16_t ’ {aka ‘short unsigned int ’} makes integer from pointer without a cast [-Werror=int-conversion]
event.se_assoc_id = SCTP_FUTURE_ASSOC;
^
/<>/neat_core.c: In function ‘nt_sctp_init_events’:
/<>/neat_core.c:5961:9: error: ‘SCTP_SEND_FAILED_EVENT’ undeclared (first use in this function); did you mean ‘SCTP_SEND_FAILED’?
SCTP_SEND_FAILED_EVENT,
^>/neat_core.c:5961:9: note: each undeclared identifier is reported only once for each function it appears in
/<>/neat_core.c:5966:25: error: ‘SCTP_FUTURE_ASSOC’ undeclared (first use in this function); did you mean ‘SCTP_RESET_ASSOC’?
event.se_assoc_id = SCTP_FUTURE_ASSOC;
^>/neat_core.c:5966:23: error: assignment to ‘sctp_assoc_t’ {aka ‘int’} from ‘uint16_t ’ {aka ‘short unsigned int ’} makes integer from pointer without a cast [-Werror=int-conversion]
event.se_assoc_id = SCTP_FUTURE_ASSOC;
^
~~~~~ SCTP_SEND_FAILED /<~~~~ SCTP_RESET_ASSOC /<~~~~~ SCTP_SEND_FAILED /<~~~~ SCTP_RESET_ASSOC /<