Open
Description
In file included from src/libsam3a/libsam3a.c:12:
src/libsam3a/libsam3a.h:55:46: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration
55 | extern uint64_t sam3atimeval2ms(const struct timeval *tv);
| ^~~~~~~
src/libsam3a/libsam3a.h:56:36: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration
56 | extern void sam3ams2timeval(struct timeval *tv, uint64_t ms);
| ^~~~~~~
In file included from src/libsam3/libsam3.c:10:
src/libsam3/libsam3.h:66:8: error: unknown type name 'ssize_t'
66 | extern ssize_t sam3tcpReceiveEx(int fd, void *buf, size_t bufSize,
| ^~~~~~~
src/libsam3/libsam3.h:69:8: error: unknown type name 'ssize_t'
69 | extern ssize_t sam3tcpReceive(int fd, void *buf, size_t bufSize);
| ^~~~~~~
src/libsam3/libsam3.h:293:8: error: unknown type name 'ssize_t'
293 | extern ssize_t sam3DatagramReceive(Sam3Session *ses, void *buf, size_t bufsize);
| ^~~~~~~
src/libsam3/libsam3.h:309:8: error: unknown type name 'ssize_t'
309 | extern ssize_t sam3Base32Encode(char *dest, size_t destsz, const void *srcbuf,
| ^~~~~~~
src/libsam3/libsam3.c: In function 'sam3tcpSetTimeoutSend':
src/libsam3/libsam3.c:65:13: warning: implicit declaration of function 'setsockopt' [-Wimplicit-function-declaration]
65 | return (setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(tv)) < 0 ? -1
| ^~~~~~~~~~
src/libsam3a/libsam3a.c:53:10: error: conflicting types for 'sam3atimeval2ms'; have 'uint64_t(const struct timeval *)' {aka 'long long unsigned int(const struct timeval *)'}
53 | uint64_t sam3atimeval2ms(const struct timeval *tv) {
| ^~~~~~~~~~~~~~~
src/libsam3a/libsam3a.h:55:17: note: previous declaration of 'sam3atimeval2ms' with type 'uint64_t(const struct timeval *)' {aka 'long long unsigned int(const struct timeval *)'}
55 | extern uint64_t sam3atimeval2ms(const struct timeval *tv);
| ^~~~~~~~~~~~~~~
src/libsam3/libsam3.c:65:28: error: 'SOL_SOCKET' undeclared (first use in this function)
65 | return (setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(tv)) < 0 ? -1
| ^~~~~~~~~~
src/libsam3a/libsam3a.c:57:6: error: conflicting types for 'sam3ams2timeval'; have 'void(struct timeval *, uint64_t)' {aka 'void(struct timeval *, long long unsigned int)'}
57 | void sam3ams2timeval(struct timeval *tv, uint64_t ms) {
| ^~~~~~~~~~~~~~~
src/libsam3/libsam3.c:65:28: note: each undeclared identifier is reported only once for each function it appears in
src/libsam3a/libsam3a.h:56:13: note: previous declaration of 'sam3ams2timeval' with type 'void(struct timeval *, uint64_t)' {aka 'void(struct timeval *, long long unsigned int)'}
56 | extern void sam3ams2timeval(struct timeval *tv, uint64_t ms);
| ^~~~~~~~~~~~~~~
src/libsam3/libsam3.c:65:40: error: 'SO_SNDTIMEO' undeclared (first use in this function)
65 | return (setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(tv)) < 0 ? -1
| ^~~~~~~~~~~
src/libsam3/libsam3.c: In function 'sam3tcpSetTimeoutReceive':
src/libsam3/libsam3.c:76:28: error: 'SOL_SOCKET' undeclared (first use in this function)
76 | return (setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv)) < 0 ? -1
| ^~~~~~~~~~
src/libsam3/libsam3.c:76:40: error: 'SO_RCVTIMEO' undeclared (first use in this function)
76 | return (setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv)) < 0 ? -1
| ^~~~~~~~~~~
src/libsam3/libsam3.c: In function 'sam3tcpConnectIP':
src/libsam3/libsam3.c:91:22: error: storage size of 'addr' isn't known
91 | struct sockaddr_in addr;
| ^~~~
src/libsam3a/libsam3a.c: In function 'sam3aBytesAvail':
src/libsam3a/libsam3a.c:117:7: warning: implicit declaration of function 'ioctl' [-Wimplicit-function-declaration]
117 | if (ioctl(fd, FIONREAD, &av) < 0)
| ^~~~~
src/libsam3/libsam3.c:98:13: warning: implicit declaration of function 'socket' [-Wimplicit-function-declaration]
98 | if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
| ^~~~~~
src/libsam3a/libsam3a.c:117:17: error: 'FIONREAD' undeclared (first use in this function)
117 | if (ioctl(fd, FIONREAD, &av) < 0)
| ^~~~~~~~
src/libsam3a/libsam3a.c:117:17: note: each undeclared identifier is reported only once for each function it appears in
src/libsam3/libsam3.c:98:20: error: 'AF_INET' undeclared (first use in this function)
98 | if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
| ^~~~~~~
src/libsam3a/libsam3a.c: In function 'sam3aResolveHost':
src/libsam3a/libsam3a.c:127:15: warning: implicit declaration of function 'gethostbyname'; did you mean 'gethostname'? [-Wimplicit-function-declaration]
127 | if ((host = gethostbyname(hostname)) == NULL || host->h_name == NULL ||
| ^~~~~~~~~~~~~
| gethostname
src/libsam3/libsam3.c:98:29: error: 'SOCK_STREAM' undeclared (first use in this function)
98 | if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
| ^~~~~~~~~~~
src/libsam3a/libsam3a.c:127:13: warning: assignment to 'struct hostent *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
127 | if ((host = gethostbyname(hostname)) == NULL || host->h_name == NULL ||
| ^
src/libsam3a/libsam3a.c:127:55: error: invalid use of undefined type 'struct hostent'
127 | if ((host = gethostbyname(hostname)) == NULL || host->h_name == NULL ||
| ^~
src/libsam3a/libsam3a.c:128:12: error: invalid use of undefined type 'struct hostent'
128 | !host->h_addr_list[0][0]) {
| ^~
src/libsam3a/libsam3a.c:133:33: error: invalid use of undefined type 'struct hostent'
133 | return ((struct in_addr *)host->h_addr_list[0])->s_addr;
| ^~
src/libsam3/libsam3.c:111:9: warning: implicit declaration of function 'getnameinfo' [-Wimplicit-function-declaration]
111 | if (getnameinfo((struct sockaddr *)&addr, sizeof(struct sockaddr_in), ipstr,
| ^~~~~~~~~~~
src/libsam3/libsam3.c:111:54: error: invalid application of 'sizeof' to incomplete type 'struct sockaddr_in'
111 | if (getnameinfo((struct sockaddr *)&addr, sizeof(struct sockaddr_in), ipstr,
| ^~~~~~
src/libsam3a/libsam3a.c: In function 'sam3aConnect':
src/libsam3a/libsam3a.c:145:13: warning: implicit declaration of function 'socket' [-Wimplicit-function-declaration]
145 | if ((fd = socket(AF_INET, SOCK_STREAM | SOCK_NONBLOCK | SOCK_CLOEXEC, 0)) < 0)
| ^~~~~~
src/libsam3/libsam3.c:112:45: error: 'NI_NUMERICHOST' undeclared (first use in this function)
112 | sizeof(ipstr), NULL, 0, NI_NUMERICHOST) == 0) {
| ^~~~~~~~~~~~~~
src/libsam3a/libsam3a.c:145:20: error: 'AF_INET' undeclared (first use in this function)
145 | if ((fd = socket(AF_INET, SOCK_STREAM | SOCK_NONBLOCK | SOCK_CLOEXEC, 0)) < 0)
| ^~~~~~~
src/libsam3/libsam3.c:117:18: error: 'SOL_SOCKET' undeclared (first use in this function)
117 | setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &val, sizeof(val));
| ^~~~~~~~~~
src/libsam3a/libsam3a.c:145:29: error: 'SOCK_STREAM' undeclared (first use in this function)
145 | if ((fd = socket(AF_INET, SOCK_STREAM | SOCK_NONBLOCK | SOCK_CLOEXEC, 0)) < 0)
| ^~~~~~~~~~~
src/libsam3/libsam3.c:117:30: error: 'SO_KEEPALIVE' undeclared (first use in this function)
117 | setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &val, sizeof(val));
| ^~~~~~~~~~~~
src/libsam3a/libsam3a.c:145:43: error: 'SOCK_NONBLOCK' undeclared (first use in this function); did you mean 'SIG_UNBLOCK'?
145 | if ((fd = socket(AF_INET, SOCK_STREAM | SOCK_NONBLOCK | SOCK_CLOEXEC, 0)) < 0)
| ^~~~~~~~~~~~~
| SIG_UNBLOCK
src/libsam3/libsam3.c:119:7: warning: implicit declaration of function 'connect' [-Wimplicit-function-declaration]
119 | if (connect(fd, (struct sockaddr *)&addr, sizeof(struct sockaddr_in)) < 0) {
| ^~~~~~~
src/libsam3/libsam3.c:119:52: error: invalid application of 'sizeof' to incomplete type 'struct sockaddr_in'
119 | if (connect(fd, (struct sockaddr *)&addr, sizeof(struct sockaddr_in)) < 0) {
| ^~~~~~
src/libsam3a/libsam3a.c:145:59: error: 'SOCK_CLOEXEC' undeclared (first use in this function)
145 | if ((fd = socket(AF_INET, SOCK_STREAM | SOCK_NONBLOCK | SOCK_CLOEXEC, 0)) < 0)
| ^~~~~~~~~~~~
src/libsam3/libsam3.c:91:22: warning: unused variable 'addr' [-Wunused-variable]
91 | struct sockaddr_in addr;
| ^~~~
src/libsam3a/libsam3a.c:148:3: warning: implicit declaration of function 'setsockopt' [-Wimplicit-function-declaration]
148 | setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &val, sizeof(val));
| ^~~~~~~~~~
src/libsam3/libsam3.c: In function 'sam3tcpConnect':
src/libsam3/libsam3.c:139:10: warning: implicit declaration of function 'gethostbyname'; did you mean 'gethostname'? [-Wimplicit-function-declaration]
139 | host = gethostbyname(hostname);
| ^~~~~~~~~~~~~
| gethostname
src/libsam3a/libsam3a.c:148:18: error: 'SOL_SOCKET' undeclared (first use in this function)
148 | setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &val, sizeof(val));
| ^~~~~~~~~~
src/libsam3/libsam3.c:139:8: warning: assignment to 'struct hostent *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
139 | host = gethostbyname(hostname);
| ^
src/libsam3/libsam3.c:140:27: error: invalid use of undefined type 'struct hostent'
140 | if (host == NULL || host->h_name == NULL || !host->h_name[0]) {
| ^~
src/libsam3/libsam3.c:140:52: error: invalid use of undefined type 'struct hostent'
140 | if (host == NULL || host->h_name == NULL || !host->h_name[0]) {
| ^~
src/libsam3/libsam3.c:149:24: error: storage size of 'addr' isn't known
149 | struct sockaddr_in addr;
| ^~~~
src/libsam3a/libsam3a.c:148:30: error: 'SO_KEEPALIVE' undeclared (first use in this function)
148 | setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &val, sizeof(val));
| ^~~~~~~~~~~~
src/libsam3a/libsam3a.c:151:24: error: storage size of 'addr' isn't known
151 | struct sockaddr_in addr;
| ^~~~
src/libsam3a/libsam3a.c:158:9: warning: implicit declaration of function 'connect' [-Wimplicit-function-declaration]
158 | if (connect(fd, (struct sockaddr *)&addr, sizeof(struct sockaddr_in)) < 0) {
| ^~~~~~~
src/libsam3/libsam3.c:151:23: error: 'AF_INET' undeclared (first use in this function)
151 | addr.sin_family = AF_INET;
| ^~~~~~~
src/libsam3a/libsam3a.c:158:54: error: invalid application of 'sizeof' to incomplete type 'struct sockaddr_in'
158 | if (connect(fd, (struct sockaddr *)&addr, sizeof(struct sockaddr_in)) < 0) {
| ^~~~~~
src/libsam3/libsam3.c:153:45: error: invalid use of undefined type 'struct hostent'
153 | addr.sin_addr = *((struct in_addr *)host->h_addr);
| ^~
src/libsam3/libsam3.c:155:54: error: invalid application of 'sizeof' to incomplete type 'struct sockaddr_in'
155 | if (getnameinfo((struct sockaddr *)&addr, sizeof(struct sockaddr_in), ipstr,
| ^~~~~~
src/libsam3a/libsam3a.c:151:24: warning: unused variable 'addr' [-Wunused-variable]
151 | struct sockaddr_in addr;
| ^~~~
src/libsam3a/libsam3a.c: In function 'sam3aDisconnect':
src/libsam3a/libsam3a.c:179:5: warning: implicit declaration of function 'shutdown' [-Wimplicit-function-declaration]
179 | shutdown(fd, SHUT_RDWR);
| ^~~~~~~~
src/libsam3/libsam3.c:156:45: error: 'NI_NUMERICHOST' undeclared (first use in this function)
156 | sizeof(ipstr), NULL, 0, NI_NUMERICHOST) == 0) {
| ^~~~~~~~~~~~~~
src/libsam3/libsam3.c:149:24: warning: unused variable 'addr' [-Wunused-variable]
149 | struct sockaddr_in addr;
| ^~~~
src/libsam3/libsam3.c:162:34: error: invalid use of undefined type 'struct hostent'
162 | *ip = ((struct in_addr *)host->h_addr)->s_addr;
| ^~
src/libsam3/libsam3.c:163:50: error: invalid use of undefined type 'struct hostent'
163 | return sam3tcpConnectIP(((struct in_addr *)host->h_addr)->s_addr, port);
| ^~
src/libsam3a/libsam3a.c:179:18: error: 'SHUT_RDWR' undeclared (first use in this function)
179 | shutdown(fd, SHUT_RDWR);
| ^~~~~~~~~
src/libsam3/libsam3.c: In function 'sam3tcpDisconnect':
src/libsam3/libsam3.c:169:5: warning: implicit declaration of function 'shutdown' [-Wimplicit-function-declaration]
169 | shutdown(fd, SHUT_RDWR);
| ^~~~~~~~
src/libsam3a/libsam3a.c: In function 'sam3aSendBytes':
src/libsam3a/libsam3a.c:196:14: warning: implicit declaration of function 'send' [-Wimplicit-function-declaration]
196 | int wr = send(fd, c, bufSize, MSG_NOSIGNAL);
| ^~~~
src/libsam3/libsam3.c:169:18: error: 'SHUT_RDWR' undeclared (first use in this function)
169 | shutdown(fd, SHUT_RDWR);
| ^~~~~~~~~
src/libsam3a/libsam3a.c:196:35: error: 'MSG_NOSIGNAL' undeclared (first use in this function)
196 | int wr = send(fd, c, bufSize, MSG_NOSIGNAL);
| ^~~~~~~~~~~~
src/libsam3/libsam3.c: In function 'sam3tcpSend':
src/libsam3/libsam3.c:185:14: warning: implicit declaration of function 'send' [-Wimplicit-function-declaration]
185 | int wr = send(fd, c, bufSize, MSG_NOSIGNAL);
| ^~~~
src/libsam3/libsam3.c:185:35: error: 'MSG_NOSIGNAL' undeclared (first use in this function)
185 | int wr = send(fd, c, bufSize, MSG_NOSIGNAL);
| ^~~~~~~~~~~~
src/libsam3/libsam3.c: At top level:
src/libsam3/libsam3.c:201:9: error: conflicting types for 'sam3tcpReceiveEx'; have 'ssize_t(int, void *, size_t, int)' {aka 'long int(int, void *, long unsigned int, int)'}
201 | ssize_t sam3tcpReceiveEx(int fd, void *buf, size_t bufSize, int allowPartial) {
| ^~~~~~~~~~~~~~~~
src/libsam3/libsam3.h:66:16: note: previous declaration of 'sam3tcpReceiveEx' with type 'int(int, void *, size_t, int)' {aka 'int(int, void *, long unsigned int, int)'}
66 | extern ssize_t sam3tcpReceiveEx(int fd, void *buf, size_t bufSize,
| ^~~~~~~~~~~~~~~~
src/libsam3/libsam3.c: In function 'sam3tcpReceiveEx':
src/libsam3/libsam3.c:209:14: warning: implicit declaration of function 'recv' [-Wimplicit-function-declaration]
209 | int rd = recv(fd, c, bufSize, 0);
| ^~~~
src/libsam3/libsam3.c: At top level:
src/libsam3/libsam3.c:227:9: error: conflicting types for 'sam3tcpReceive'; have 'ssize_t(int, void *, size_t)' {aka 'long int(int, void *, long unsigned int)'}
227 | ssize_t sam3tcpReceive(int fd, void *buf, size_t bufSize) {
| ^~~~~~~~~~~~~~
src/libsam3/libsam3.h:69:16: note: previous declaration of 'sam3tcpReceive' with type 'int(int, void *, size_t)' {aka 'int(int, void *, long unsigned int)'}
69 | extern ssize_t sam3tcpReceive(int fd, void *buf, size_t bufSize);
| ^~~~~~~~~~~~~~
src/libsam3/libsam3.c: In function 'sam3tcpReceiveStr':
src/libsam3/libsam3.c:281:39: error: 'MSG_PEEK' undeclared (first use in this function)
281 | int rd = recv(fd, d, maxSize - 1, MSG_PEEK);
| ^~~~~~~~
src/libsam3/libsam3.c: In function 'sam3udpSendToIP':
src/libsam3/libsam3.c:320:22: error: storage size of 'addr' isn't known
320 | struct sockaddr_in addr;
| ^~~~
src/libsam3/libsam3.c:328:20: error: 'AF_INET' undeclared (first use in this function)
328 | if ((fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0) {
| ^~~~~~~
src/libsam3/libsam3.c:328:29: error: 'SOCK_DGRAM' undeclared (first use in this function)
328 | if ((fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0) {
| ^~~~~~~~~~
src/libsam3/libsam3.c:328:41: error: 'IPPROTO_UDP' undeclared (first use in this function)
328 | if ((fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0) {
| ^~~~~~~~~~~
src/libsam3/libsam3.c:339:9: warning: implicit declaration of function 'sendto' [-Wimplicit-function-declaration]
339 | res = sendto(fd, buf, bufSize, 0, (struct sockaddr *)&addr, sizeof(addr));
| ^~~~~~
src/libsam3a/libsam3a.c: In function 'genSeed':
src/libsam3a/libsam3a.c:654:18: error: storage size of 'sy' isn't known
654 | struct sysinfo sy;
| ^~
src/libsam3/libsam3.c:320:22: warning: unused variable 'addr' [-Wunused-variable]
320 | struct sockaddr_in addr;
| ^~~~
src/libsam3a/libsam3a.c:657:3: warning: implicit declaration of function 'sysinfo' [-Wimplicit-function-declaration]
657 | sysinfo(&sy);
| ^~~~~~~
src/libsam3/libsam3.c: In function 'sam3udpSendTo':
src/libsam3/libsam3.c:368:8: warning: assignment to 'struct hostent *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
368 | host = gethostbyname(hostname);
| ^
src/libsam3/libsam3.c:369:27: error: invalid use of undefined type 'struct hostent'
369 | if (host == NULL || host->h_name == NULL || !host->h_name[0]) {
| ^~
src/libsam3/libsam3.c:369:52: error: invalid use of undefined type 'struct hostent'
369 | if (host == NULL || host->h_name == NULL || !host->h_name[0]) {
| ^~
src/libsam3a/libsam3a.c:654:18: warning: unused variable 'sy' [-Wunused-variable]
654 | struct sysinfo sy;
| ^~
src/libsam3/libsam3.c:376:34: error: invalid use of undefined type 'struct hostent'
376 | *ip = ((struct in_addr *)host->h_addr)->s_addr;
| ^~
src/libsam3/libsam3.c:377:49: error: invalid use of undefined type 'struct hostent'
377 | return sam3udpSendToIP(((struct in_addr *)host->h_addr)->s_addr, port, buf,
| ^~
src/libsam3a/libsam3a.c: In function 'connDisconnect':
src/libsam3a/libsam3a.c:733:24: error: 'SHUT_RDWR' undeclared (first use in this function)
733 | shutdown(conn->fd, SHUT_RDWR);
| ^~~~~~~~~
src/libsam3a/libsam3a.c: In function 'sesDisconnect':
src/libsam3a/libsam3a.c:747:23: error: 'SHUT_RDWR' undeclared (first use in this function)
747 | shutdown(ses->fd, SHUT_RDWR);
| ^~~~~~~~~
src/libsam3a/libsam3a.c: In function 'aioLineReader':
src/libsam3a/libsam3a.c:799:15: warning: implicit declaration of function 'recv' [-Wimplicit-function-declaration]
799 | if ((rd = recv(fd, aio->data + aio->dataPos, rd, MSG_PEEK)) < 0) {
| ^~~~
src/libsam3/libsam3.c: In function 'genSeed':
src/libsam3a/libsam3a.c:799:54: error: 'MSG_PEEK' undeclared (first use in this function)
799 | if ((rd = recv(fd, aio->data + aio->dataPos, rd, MSG_PEEK)) < 0) {
| ^~~~~~~~
src/libsam3/libsam3.c:614:18: error: storage size of 'sy' isn't known
614 | struct sysinfo sy;
| ^~
src/libsam3/libsam3.c:617:3: warning: implicit declaration of function 'sysinfo' [-Wimplicit-function-declaration]
617 | sysinfo(&sy);
| ^~~~~~~
src/libsam3/libsam3.c:614:18: warning: unused variable 'sy' [-Wunused-variable]
614 | struct sysinfo sy;
| ^~
src/libsam3a/libsam3a.c: In function 'aioSesConnected':
src/libsam3a/libsam3a.c:1002:3: error: unknown type name 'socklen_t'
1002 | socklen_t len = sizeof(res);
| ^~~~~~~~~
src/libsam3a/libsam3a.c:1004:7: warning: implicit declaration of function 'getsockopt'; did you mean 'getsubopt'? [-Wimplicit-function-declaration]
1004 | if (getsockopt(ses->fd, SOL_SOCKET, SO_ERROR, &res, &len) == 0 && res == 0) {
| ^~~~~~~~~~
| getsubopt
src/libsam3a/libsam3a.c:1004:27: error: 'SOL_SOCKET' undeclared (first use in this function)
1004 | if (getsockopt(ses->fd, SOL_SOCKET, SO_ERROR, &res, &len) == 0 && res == 0) {
| ^~~~~~~~~~
src/libsam3a/libsam3a.c:1004:39: error: 'SO_ERROR' undeclared (first use in this function)
1004 | if (getsockopt(ses->fd, SOL_SOCKET, SO_ERROR, &res, &len) == 0 && res == 0) {
| ^~~~~~~~
src/libsam3/libsam3.c: At top level:
src/libsam3/libsam3.c:1160:9: error: conflicting types for 'sam3DatagramReceive'; have 'ssize_t(Sam3Session *, void *, size_t)' {aka 'long int(Sam3Session *, void *, long unsigned int)'}
1160 | ssize_t sam3DatagramReceive(Sam3Session *ses, void *buf, size_t bufsize) {
| ^~~~~~~~~~~~~~~~~~~
src/libsam3/libsam3.h:293:16: note: previous declaration of 'sam3DatagramReceive' with type 'int(Sam3Session *, void *, size_t)' {aka 'int(Sam3Session *, void *, long unsigned int)'}
293 | extern ssize_t sam3DatagramReceive(Sam3Session *ses, void *buf, size_t bufsize);
| ^~~~~~~~~~~~~~~~~~~
src/libsam3/libsam3.c:1227:9: error: conflicting types for 'sam3Base32Encode'; have 'ssize_t(char *, size_t, const void *, size_t)' {aka 'long int(char *, long unsigned int, const void *, long unsigned int)'}
1227 | ssize_t sam3Base32Encode(char *dest, size_t destsz, const void *srcbuf,
| ^~~~~~~~~~~~~~~~
src/libsam3/libsam3.h:309:16: note: previous declaration of 'sam3Base32Encode' with type 'int(char *, size_t, const void *, size_t)' {aka 'int(char *, long unsigned int, const void *, long unsigned int)'}
309 | extern ssize_t sam3Base32Encode(char *dest, size_t destsz, const void *srcbuf,
| ^~~~~~~~~~~~~~~~
src/libsam3a/libsam3a.c: In function 'aioConnConnected':
src/libsam3a/libsam3a.c:1458:3: error: unknown type name 'socklen_t'
1458 | socklen_t len = sizeof(res);
| ^~~~~~~~~
src/libsam3a/libsam3a.c:1460:28: error: 'SOL_SOCKET' undeclared (first use in this function)
1460 | if (getsockopt(conn->fd, SOL_SOCKET, SO_ERROR, &res, &len) == 0 && res == 0) {
| ^~~~~~~~~~
src/libsam3a/libsam3a.c:1460:40: error: 'SO_ERROR' undeclared (first use in this function)
1460 | if (getsockopt(conn->fd, SOL_SOCKET, SO_ERROR, &res, &len) == 0 && res == 0) {
| ^~~~~~~~
src/libsam3/libsam3.c: In function 'sam3tcpConnect':
src/libsam3/libsam3.c:164:1: warning: control reaches end of non-void function [-Wreturn-type]
164 | }
| ^
src/libsam3/libsam3.c: In function 'sam3udpSendTo':
src/libsam3/libsam3.c:379:1: warning: control reaches end of non-void function [-Wreturn-type]
379 | }
| ^
src/libsam3a/libsam3a.c: In function 'sam3aResolveHost':
src/libsam3a/libsam3a.c:134:1: warning: control reaches end of non-void function [-Wreturn-type]
134 | }
| ^
make: *** [src/libsam3/libsam3.o] Error 1
Metadata
Metadata
Assignees
Labels
No labels