Opened 8 months ago
Last modified 8 months ago
#69043 assigned defect
libknot: error: unknown type name 'sa_endpoints_t' (support earlier OS?)
Reported by: | barracuda156 | Owned by: | catap (Kirill A. Korinsky) |
---|---|---|---|
Priority: | Low | Milestone: | |
Component: | ports | Version: | 2.8.1 |
Keywords: | yosemite, mavericks, mountainlion, lion, snowleopard, leopard | Cc: | |
Port: | libknot |
Description
I have seen that the port is currently restricted to Darwin 15+, so setting priority to low. But maybe this can be fixed? It fails here:
gcc-4.2:
contrib/net.c: In function 'tfo_connect': contrib/net.c:254: error: 'sa_endpoints_t' undeclared (first use in this function) contrib/net.c:254: error: (Each undeclared identifier is reported only once contrib/net.c:254: error: for each function it appears in.) contrib/net.c:254: error: expected ';' before 'ep' contrib/net.c:258: error: 'CONNECT_DATA_IDEMPOTENT' undeclared (first use in this function) contrib/net.c:258: error: 'CONNECT_RESUME_ON_READ_WRITE' undeclared (first use in this function) contrib/net.c:260: warning: implicit declaration of function 'connectx' contrib/net.c:260: error: 'ep' undeclared (first use in this function) contrib/net.c:260: error: 'SAE_ASSOCID_ANY' undeclared (first use in this function) contrib/semaphore.c:24: warning: ignoring #pragma clang diagnostic make[3]: *** [contrib/libcontrib_la-net.lo] Error 1
gcc-13:
contrib/net.c: In function 'tfo_connect': contrib/net.c:254:9: error: unknown type name 'sa_endpoints_t' 254 | sa_endpoints_t ep = { | ^~~~~~~~~~~~~~ contrib/net.c:255:17: error: field name not in record or union initializer 255 | .sae_dstaddr = (const struct sockaddr *)addr, | ^ contrib/net.c:255:17: note: (near initialization for 'ep') contrib/net.c:255:32: warning: initialization of 'int' from 'const struct sockaddr *' makes integer from pointer without a cast [-Wint-conversion] 255 | .sae_dstaddr = (const struct sockaddr *)addr, | ^ contrib/net.c:255:32: note: (near initialization for 'ep') contrib/net.c:256:17: error: field name not in record or union initializer 256 | .sae_dstaddrlen = sockaddr_len(addr) | ^ contrib/net.c:256:17: note: (near initialization for 'ep') contrib/net.c:256:35: warning: excess elements in scalar initializer 256 | .sae_dstaddrlen = sockaddr_len(addr) | ^~~~~~~~~~~~ contrib/net.c:256:35: note: (near initialization for 'ep') contrib/net.c:258:22: error: 'CONNECT_DATA_IDEMPOTENT' undeclared (first use in this function) 258 | int flags = CONNECT_DATA_IDEMPOTENT | CONNECT_RESUME_ON_READ_WRITE; | ^~~~~~~~~~~~~~~~~~~~~~~ contrib/net.c:258:22: note: each undeclared identifier is reported only once for each function it appears in contrib/net.c:258:48: error: 'CONNECT_RESUME_ON_READ_WRITE' undeclared (first use in this function) 258 | int flags = CONNECT_DATA_IDEMPOTENT | CONNECT_RESUME_ON_READ_WRITE; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ contrib/net.c:260:19: error: implicit declaration of function 'connectx'; did you mean 'connect'? [-Werror=implicit-function-declaration] 260 | int ret = connectx(sock, &ep, SAE_ASSOCID_ANY, flags, NULL, 0, NULL, NULL); | ^~~~~~~~ | connect contrib/net.c:260:39: error: 'SAE_ASSOCID_ANY' undeclared (first use in this function) 260 | int ret = connectx(sock, &ep, SAE_ASSOCID_ANY, flags, NULL, 0, NULL, NULL); | ^~~~~~~~~~~~~~~ cc1: some warnings being treated as errors
Note: See
TracTickets for help on using
tickets.
Base on https://developer.apple.com/documentation/kernel/sa_endpoints_t it is clear that required structure were introduced since 10.11 :)
You may try to add condition to this ifdef that brokes TCP Fast Open feature. Probably it might work after all.