=> Bootstrap dependency digest>=20211023: found digest-20220214 WARNING: [license.mk] Every package should define a LICENSE. ===> Building for socks4-2.2nb1 (cd lib; /opt/pkg/bin/bmake CC="clang" GETPASS="" OPTIMIZE="-pipe -Os -Wno-error=return-type" RCMD="Rrcmd.o" SUPPORT_RCMD="-DSUPPORT_RCMD" DNS_THROUGH_NIS="" OTHER_CFLAGS=" " RANLIB="ranlib") /Users/pbulk/build/net/socks4/work/socks.cstc.4.2/lib clang -I../include -pipe -Os -Wno-error=return-type -DSUPPORT_RCMD -c Rconnect.c Rconnect.c:129:2: warning: implicit declaration of function 'gethostname' is invalid in C99 [-Wimplicit-function-declaration] gethostname(socks_src_name, sizeof(socks_src_name)); ^ Rconnect.c:165:41: warning: implicit declaration of function 'inet_addr' is invalid in C99 [-Wimplicit-function-declaration] _res.nsaddr_list[0].sin_addr.s_addr = inet_addr(ns); ^ Rconnect.c:202:15: warning: implicit declaration of function 'inet_addr' is invalid in C99 [-Wimplicit-function-declaration] SocksHost = inet_addr(socks_server); ^ Rconnect.c:211:26: warning: implicit declaration of function 'getuid' is invalid in C99 [-Wimplicit-function-declaration] if ((pw = getpwuid(uid=getuid())) == NULL) { ^ Rconnect.c:219:25: warning: implicit declaration of function 'geteuid' is invalid in C99 [-Wimplicit-function-declaration] if ((pw = getpwuid(uid=geteuid())) == NULL) { ^ Rconnect.c:252:22: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] while (socks_server = socks_serverlist) { ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ Rconnect.c:252:22: note: place parentheses around the assignment to silence this warning while (socks_server = socks_serverlist) { ^ ( ) Rconnect.c:252:22: note: use '==' to turn this assignment into an equality comparison while (socks_server = socks_serverlist) { ^ == Rconnect.c:253:24: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] if (socks_serverlist = index(socks_serverlist, ',')) ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Rconnect.c:253:24: note: place parentheses around the assignment to silence this warning if (socks_serverlist = index(socks_serverlist, ',')) ^ ( ) Rconnect.c:253:24: note: use '==' to turn this assignment into an equality comparison if (socks_serverlist = index(socks_serverlist, ',')) ^ == Rconnect.c:258:33: warning: implicit declaration of function 'inet_addr' is invalid in C99 [-Wimplicit-function-declaration] socks_nsin.sin_addr.s_addr = inet_addr(socks_server); ^ Rconnect.c:279:16: warning: implicit declaration of function 'rresvport' is invalid in C99 [-Wimplicit-function-declaration] new_sock = rresvport(lport); ^ Rconnect.c:289:8: warning: implicit declaration of function 'dup2' is invalid in C99 [-Wimplicit-function-declaration] if (dup2(new_sock, sock) < 0) { ^ Rconnect.c:290:5: warning: implicit declaration of function 'close' is invalid in C99 [-Wimplicit-function-declaration] close(new_sock); ^ Rconnect.c:293:5: warning: implicit declaration of function 'close' is invalid in C99 [-Wimplicit-function-declaration] close(new_sock); ^ Rconnect.c:297:4: warning: implicit declaration of function 'close' is invalid in C99 [-Wimplicit-function-declaration] close(new_sock); ^ Rconnect.c:343:11: warning: implicit declaration of function 'write' is invalid in C99 [-Wimplicit-function-declaration] if((n = write(s, p, i)) <= 0) { ^ Rconnect.c:359:13: warning: implicit declaration of function 'socks_SendDst' is invalid in C99 [-Wimplicit-function-declaration] if ((sta = socks_SendDst(s, dst)) < 0) { ^ Rconnect.c:373:13: warning: implicit declaration of function 'socks_GetDst' is invalid in C99 [-Wimplicit-function-declaration] if ((sta = socks_GetDst(s, dst)) < 0) { ^ Rconnect.c:386:2: warning: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Wimplicit-function-declaration] exit(SOCKS_FAIL); ^ Rconnect.c:386:2: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit' Rconnect.c:397:2: warning: implicit declaration of function 'alarm' is invalid in C99 [-Wimplicit-function-declaration] alarm(CLIENT_CONN_TIMEOUT); ^ Rconnect.c:416:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] Rconnect(sock, sin, size) ^ Rconnect.c:448:20: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] } else if (status = socks_conn_code) { ~~~~~~~^~~~~~~~~~~~~~~~~ Rconnect.c:448:20: note: place parentheses around the assignment to silence this warning } else if (status = socks_conn_code) { ^ ( ) Rconnect.c:448:20: note: use '==' to turn this assignment into an equality comparison } else if (status = socks_conn_code) { ^ == Rconnect.c:528:11: warning: implicit declaration of function 'socks_check_cconf' is invalid in C99 [-Wimplicit-function-declaration] direct = socks_check_cconf(&me, sin); ^ Rconnect.c:600:22: warning: implicit declaration of function 'fork' is invalid in C99 [-Wimplicit-function-declaration] switch (child_pid = fork()) { ^ Rconnect.c:639:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] Rbind(sock, sin, size, dsthost) ^ Rconnect.c:683:11: warning: implicit declaration of function 'socks_check_cconf' is invalid in C99 [-Wimplicit-function-declaration] direct = socks_check_cconf(&me, &psin); ^ Rconnect.c:780:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] Rlisten(s, n) ^ Rconnect.c:797:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] Rgetsockname(sock, sin, size) ^ Rconnect.c:810:53: warning: passing 'int *' to parameter of type 'socklen_t *' (aka 'unsigned int *') converts between pointers to integer types with different sign [-Wpointer-sign] return (getsockname(sock, (struct sockaddr *)sin, size)); ^~~~ /Applications/Xcode-13.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/sys/socket.h:710:78: note: passing argument to parameter here int getsockname(int, struct sockaddr * __restrict, socklen_t * __restrict) ^ Rconnect.c:823:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] Raccept(sock, sin, size) ^ Rconnect.c:839:47: warning: passing 'int *' to parameter of type 'socklen_t *' (aka 'unsigned int *') converts between pointers to integer types with different sign [-Wpointer-sign] return(accept(sock, (struct sockaddr *)sin, size)); ^~~~ /Applications/Xcode-13.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/sys/socket.h:704:73: note: passing argument to parameter here int accept(int, struct sockaddr * __restrict, socklen_t * __restrict) ^ Rconnect.c:847:4: warning: implicit declaration of function 'socks_GetDst' is invalid in C99 [-Wimplicit-function-declaration] socks_GetDst(sock, &dst); ^ Rconnect.c:851:11: warning: implicit declaration of function 'dup' is invalid in C99 [-Wimplicit-function-declaration] return(dup(sock)); ^ 31 warnings generated. clang -I../include -pipe -Os -Wno-error=return-type -DSUPPORT_RCMD -c SendGetDst.c SendGetDst.c:13:9: warning: 'NULL' macro redefined [-Wmacro-redefined] #define NULL ((char *)0) ^ /Applications/Xcode-13.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/sys/_types/_null.h:30:9: note: previous definition is here #define NULL __DARWIN_NULL ^ SendGetDst.c:28:2: warning: implicit declaration of function 'bcopy' is invalid in C99 [-Wimplicit-function-declaration] bcopy(&dst->port, c+2, sizeof(dst->port)); ^ SendGetDst.c:36:30: warning: incompatible pointer types passing 'char *' to parameter of type 'fd_set *' (aka 'struct fd_set *') [-Wincompatible-pointer-types] if ((ret = select(fdsbits, NULL, &fds, NULL, &timeout)) == 0) ^~~~ SendGetDst.c:13:14: note: expanded from macro 'NULL' #define NULL ((char *)0) ^~~~~~~~~~~ /Applications/Xcode-13.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/sys/_select.h:43:41: note: passing argument to parameter here int select(int, fd_set * __restrict, fd_set * __restrict, ^ SendGetDst.c:36:42: warning: incompatible pointer types passing 'char *' to parameter of type 'fd_set *' (aka 'struct fd_set *') [-Wincompatible-pointer-types] if ((ret = select(fdsbits, NULL, &fds, NULL, &timeout)) == 0) ^~~~ SendGetDst.c:13:14: note: expanded from macro 'NULL' #define NULL ((char *)0) ^~~~~~~~~~~ /Applications/Xcode-13.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/sys/_select.h:44:24: note: passing argument to parameter here fd_set * __restrict, struct timeval * __restrict) ^ SendGetDst.c:46:11: warning: implicit declaration of function 'write' is invalid in C99 [-Wimplicit-function-declaration] if((n = write(s, p, i)) > 0) { ^ SendGetDst.c:75:36: warning: incompatible pointer types passing 'char *' to parameter of type 'fd_set *' (aka 'struct fd_set *') [-Wincompatible-pointer-types] if ((ret = select(fdsbits, &fds, NULL, NULL, &timeout)) == 0) ^~~~ SendGetDst.c:13:14: note: expanded from macro 'NULL' #define NULL ((char *)0) ^~~~~~~~~~~ /Applications/Xcode-13.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/sys/_select.h:43:62: note: passing argument to parameter here int select(int, fd_set * __restrict, fd_set * __restrict, ^ SendGetDst.c:75:42: warning: incompatible pointer types passing 'char *' to parameter of type 'fd_set *' (aka 'struct fd_set *') [-Wincompatible-pointer-types] if ((ret = select(fdsbits, &fds, NULL, NULL, &timeout)) == 0) ^~~~ SendGetDst.c:13:14: note: expanded from macro 'NULL' #define NULL ((char *)0) ^~~~~~~~~~~ /Applications/Xcode-13.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/sys/_select.h:44:24: note: passing argument to parameter here fd_set * __restrict, struct timeval * __restrict) ^ SendGetDst.c:85:11: warning: implicit declaration of function 'read' is invalid in C99 [-Wimplicit-function-declaration] if((n = read(s, p, i)) > 0) { ^ SendGetDst.c:98:2: warning: implicit declaration of function 'bcopy' is invalid in C99 [-Wimplicit-function-declaration] bcopy(c+2, &dst->port, sizeof(dst->port)); ^ 9 warnings generated. clang -I../include -pipe -Os -Wno-error=return-type -DSUPPORT_RCMD -c saddrtoname.c saddrtoname.c:14:3: warning: implicitly declaring library function 'strncpy' with type 'char *(char *, const char *, unsigned long)' [-Wimplicit-function-declaration] strncpy(name, host->h_name, namelen); ^ saddrtoname.c:14:3: note: include the header <string.h> or explicitly provide a declaration for 'strncpy' saddrtoname.c:16:17: warning: implicit declaration of function 'inet_ntoa' is invalid in C99 [-Wimplicit-function-declaration] strncpy(name, inet_ntoa(*addr), namelen); ^ saddrtoname.c:16:17: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'const char *' [-Wint-conversion] strncpy(name, inet_ntoa(*addr), namelen); ^~~~~~~~~~~~~~~~ 3 warnings generated. clang -I../include -pipe -Os -Wno-error=return-type -DSUPPORT_RCMD -c porttoserv.c porttoserv.c:15:3: warning: implicitly declaring library function 'strncpy' with type 'char *(char *, const char *, unsigned long)' [-Wimplicit-function-declaration] strncpy(name, serv->s_name, namelen); ^ porttoserv.c:15:3: note: include the header <string.h> or explicitly provide a declaration for 'strncpy' porttoserv.c:17:3: warning: implicitly declaring library function 'sprintf' with type 'int (char *, const char *, ...)' [-Wimplicit-function-declaration] sprintf(name, "%u", port); ^ porttoserv.c:17:3: note: include the header <stdio.h> or explicitly provide a declaration for 'sprintf' 2 warnings generated. clang -I../include -pipe -Os -Wno-error=return-type -DSUPPORT_RCMD -c check_cconf.c check_cconf.c:34:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] socks_check_cconf(src, dst) ^ check_cconf.c:46:17: warning: implicit declaration of function 'inet_addr' is invalid in C99 [-Wimplicit-function-declaration] self.s_addr = inet_addr("127.0.0.1"); ^ check_cconf.c:83:3: warning: implicit declaration of function 'socks_shell_cmd' is invalid in C99 [-Wimplicit-function-declaration] socks_shell_cmd(confPtr->cmdp, src, dst); ^ check_cconf.c:88:8: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] static read_cconf(void) ~~~~~~ ^ check_cconf.c:142:4: warning: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Wimplicit-function-declaration] exit(1); ^ check_cconf.c:142:4: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit' check_cconf.c:251:25: warning: implicitly declaring library function 'malloc' with type 'void *(unsigned long)' [-Wimplicit-function-declaration] (struct config **) malloc(CONF_INCR *sizeof(struct config **)); ^ check_cconf.c:251:25: note: include the header <stdlib.h> or explicitly provide a declaration for 'malloc' check_cconf.c:253:6: warning: implicitly declaring library function 'realloc' with type 'void *(void *, unsigned long)' [-Wimplicit-function-declaration] realloc(confNtries, (Ntries +CONF_INCR) *sizeof(struct config)); ^ check_cconf.c:253:6: note: include the header <stdlib.h> or explicitly provide a declaration for 'realloc' 7 warnings generated. clang -I../include -pipe -Os -Wno-error=return-type -DSUPPORT_RCMD -c shell_cmd.c shell_cmd.c:64:26: warning: implicit declaration of function 'getpid' is invalid in C99 [-Wimplicit-function-declaration] int daemon_pid = getpid(); ^ shell_cmd.c:67:9: warning: implicitly declaring library function 'strpbrk' with type 'char *(const char *, const char *)' [-Wimplicit-function-declaration] if (strpbrk(cmd, alpha_num) == NULL) { ^ shell_cmd.c:67:9: note: include the header <string.h> or explicitly provide a declaration for 'strpbrk' shell_cmd.c:77:25: warning: implicit declaration of function 'fork' is invalid in C99 [-Wimplicit-function-declaration] switch (child_pid = fork()) { ^ shell_cmd.c:85:21: warning: implicit declaration of function 'wait' is invalid in C99 [-Wimplicit-function-declaration] while ((wait_pid = wait((int *) 0)) != -1 && wait_pid != child_pid) ^ shell_cmd.c:106:9: warning: implicit declaration of function 'close' is invalid in C99 [-Wimplicit-function-declaration] (void) close(tmp_fd); ^ shell_cmd.c:110:9: warning: implicit declaration of function 'open' is invalid in C99 [-Wimplicit-function-declaration] if (open("/dev/null", 2) != 0) { ^ shell_cmd.c:112:16: warning: implicit declaration of function 'dup' is invalid in C99 [-Wimplicit-function-declaration] } else if (dup(0) != 1 || dup(0) != 2) { ^ shell_cmd.c:115:9: warning: implicit declaration of function 'execl' is invalid in C99 [-Wimplicit-function-declaration] (void) execl("/bin/sh", "sh", "-c", command, (char *) 0); ^ shell_cmd.c:202:22: warning: implicitly declaring library function 'strlen' with type 'unsigned long (const char *)' [-Wimplicit-function-declaration] expansion_len = strlen(expansion); ^ shell_cmd.c:202:22: note: include the header <string.h> or explicitly provide a declaration for 'strlen' 9 warnings generated. clang -I../include -pipe -Os -Wno-error=return-type -DSUPPORT_RCMD -c check_user.c check_user.c:59:22: warning: implicit declaration of function 'inet_addr' is invalid in C99 [-Wimplicit-function-declaration] if ((addr->s_addr = inet_addr(dotquad)) != (u_int32) -1) ^ check_user.c:59:42: warning: result of comparison of constant 18446744073709551615 with expression of type 'in_addr_t' (aka 'unsigned int') is always true [-Wtautological-constant-out-of-range-compare] if ((addr->s_addr = inet_addr(dotquad)) != (u_int32) -1) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~ check_user.c:101:9: warning: implicit declaration of function 'atol' is invalid in C99 [-Wimplicit-function-declaration] return atol(name); ^ check_user.c:127:9: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] if (q = index(p, ',')) ~~^~~~~~~~~~~~~~~ check_user.c:127:9: note: place parentheses around the assignment to silence this warning if (q = index(p, ',')) ^ ( ) check_user.c:127:9: note: use '==' to turn this assignment into an equality comparison if (q = index(p, ',')) ^ == check_user.c:143:14: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] } while ( p = q); ~~^~~ check_user.c:143:14: note: place parentheses around the assignment to silence this warning } while ( p = q); ^ ( ) check_user.c:143:14: note: use '==' to turn this assignment into an equality comparison } while ( p = q); ^ == 5 warnings generated. clang -I../include -pipe -Os -Wno-error=return-type -DSUPPORT_RCMD -c null_syslog.c null_syslog.c:20:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] socks_0openlog(ident, log_opt, fac) ^ null_syslog.c:26:1: warning: non-void function does not return a value [-Wreturn-type] } ^ null_syslog.c:28:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] socks_0closelog() ^ null_syslog.c:31:1: warning: non-void function does not return a value [-Wreturn-type] } ^ null_syslog.c:33:9: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] VARARGS(socks_0syslog, int, prio) ^ null_syslog.c:40:1: warning: non-void function does not return a value [-Wreturn-type] } ^ 6 warnings generated. clang -I../include -pipe -Os -Wno-error=return-type -DSUPPORT_RCMD -c Rrcmd.c Rrcmd.c:60:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] Rrcmd(ahost, rport, locuser, remuser, cmd, fd2p) ^ Rrcmd.c:96:7: warning: 'rresvport' is deprecated [-Wdeprecated-declarations] s = rresvport(&lport); ^ /Applications/Xcode-13.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/unistd.h:712:1: note: 'rresvport' has been explicitly marked deprecated here __deprecated int rresvport(int *); ^ /Applications/Xcode-13.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/sys/cdefs.h:204:40: note: expanded from macro '__deprecated' #define __deprecated __attribute__((__deprecated__)) ^ Rrcmd.c:125:7: warning: implicit declaration of function 'Rconnect' is invalid in C99 [-Wimplicit-function-declaration] if (Rconnect(s, (struct sockaddr *)&sin, sizeof(sin)) >= 0) ^ Rrcmd.c:167:12: warning: 'rresvport' is deprecated [-Wdeprecated-declarations] int s2 = rresvport(&lport), s3; ^ /Applications/Xcode-13.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/unistd.h:712:1: note: 'rresvport' has been explicitly marked deprecated here __deprecated int rresvport(int *); ^ /Applications/Xcode-13.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/sys/cdefs.h:204:40: note: expanded from macro '__deprecated' #define __deprecated __attribute__((__deprecated__)) ^ Rrcmd.c:186:7: warning: implicit declaration of function 'Rbind' is invalid in C99 [-Wimplicit-function-declaration] if (Rbind(s2, (struct sockaddr *)&tsin, sizeof(tsin), ^ Rrcmd.c:193:7: warning: implicit declaration of function 'Rgetsockname' is invalid in C99 [-Wimplicit-function-declaration] if (Rgetsockname(s2, (struct sockaddr *)&tsin, &tlen) < 0) { ^ Rrcmd.c:198:3: warning: implicit declaration of function 'Rlisten' is invalid in C99 [-Wimplicit-function-declaration] Rlisten(s2, 1); ^ Rrcmd.c:228:8: warning: implicit declaration of function 'Raccept' is invalid in C99 [-Wimplicit-function-declaration] s3 = Raccept(s2, (struct sockaddr *)&from, &len); ^ 8 warnings generated. rm -f libsocks.a ar rc libsocks.a Rconnect.o SendGetDst.o saddrtoname.o porttoserv.o check_cconf.o shell_cmd.o check_user.o null_syslog.o Rrcmd.o ranlib libsocks.a (cd libident; /opt/pkg/bin/bmake CC="clang" OTHER_CFLAGS="" OPTIMIZE="-pipe -Os -Wno-error=return-type" RANLIB="ranlib") /Users/pbulk/build/net/socks4/work/socks.cstc.4.2/libident clang -pipe -Os -Wno-error=return-type -c ident.c ident.c:41:55: warning: passing 'int *' to parameter of type 'socklen_t *' (aka 'unsigned int *') converts between pointers to integer types with different sign [-Wpointer-sign] if (getpeername(fd, (struct sockaddr *)&remoteaddr, &len) < 0) ^~~~ /Applications/Xcode-13.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/sys/socket.h:708:78: note: passing argument to parameter here int getpeername(int, struct sockaddr * __restrict, socklen_t * __restrict) ^ ident.c:45:54: warning: passing 'int *' to parameter of type 'socklen_t *' (aka 'unsigned int *') converts between pointers to integer types with different sign [-Wpointer-sign] if (getsockname(fd, (struct sockaddr *)&localaddr, &len) < 0) ^~~~ /Applications/Xcode-13.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/sys/socket.h:710:78: note: passing argument to parameter here int getsockname(int, struct sockaddr * __restrict, socklen_t * __restrict) ^ ident.c:76:21: warning: implicitly declaring library function 'malloc' with type 'void *(unsigned long)' [-Wimplicit-function-declaration] ident = (IDENT *) malloc(sizeof(IDENT)); ^ ident.c:76:21: note: include the header <stdlib.h> or explicitly provide a declaration for 'malloc' ident.c:98:5: warning: implicitly declaring library function 'free' with type 'void (void *)' [-Wimplicit-function-declaration] free(ident); ^ ident.c:98:5: note: include the header <stdlib.h> or explicitly provide a declaration for 'free' 4 warnings generated. clang -pipe -Os -Wno-error=return-type -c id_open.c id_open.c:60:14: warning: incompatible redeclaration of library function 'malloc' [-Wincompatible-library-redeclaration] extern void *malloc __P((int size)); ^ id_open.c:60:14: note: 'malloc' is a builtin with type 'void *(unsigned long)' id_open.c:90:5: warning: implicitly declaring library function 'free' with type 'void (void *)' [-Wimplicit-function-declaration] free(id); ^ id_open.c:90:5: note: include the header <stdlib.h> or explicitly provide a declaration for 'free' id_open.c:172:3: warning: implicit declaration of function 'close' is invalid in C99 [-Wimplicit-function-declaration] close(id->fd); ^ 3 warnings generated. clang -pipe -Os -Wno-error=return-type -c id_close.c id_close.c:19:9: warning: implicit declaration of function 'close' is invalid in C99 [-Wimplicit-function-declaration] res = close(id->fd); ^ id_close.c:20:3: warning: implicitly declaring library function 'free' with type 'void (void *)' [-Wimplicit-function-declaration] free(id); ^ id_close.c:20:3: note: include the header <stdlib.h> or explicitly provide a declaration for 'free' 2 warnings generated. clang -pipe -Os -Wno-error=return-type -c id_query.c id_query.c:63:9: warning: implicit declaration of function 'write' is invalid in C99 [-Wimplicit-function-declaration] res = write(id->fd, buf, strlen(buf)); ^ id_query.c:63:28: warning: implicitly declaring library function 'strlen' with type 'unsigned long (const char *)' [-Wimplicit-function-declaration] res = write(id->fd, buf, strlen(buf)); ^ id_query.c:63:28: note: include the header <string.h> or explicitly provide a declaration for 'strlen' 2 warnings generated. clang -pipe -Os -Wno-error=return-type -c id_parse.c id_parse.c:148:10: warning: implicit declaration of function 'read' is invalid in C99 [-Wimplicit-function-declaration] (res = read(id->fd, id->buf + pos, 1)) == 1 && ^ 1 warning generated. rm -f libident.a ar cq libident.a ident.o id_open.o id_close.o id_query.o id_parse.o ranlib libident.a (cd sockd; /opt/pkg/bin/bmake CC="clang" RESOLV_LIB="" OPTIMIZE="-pipe -Os -Wno-error=return-type" SOCKS_LIB="/Users/pbulk/build/net/socks4/work/socks.cstc.4.2/lib/libsocks.a" SUPPORT_RCMD="-DSUPPORT_RCMD" IDENT_LIB="/Users/pbulk/build/net/socks4/work/socks.cstc.4.2/libident/libident.a" OTHER_CFLAGS=" ") /Users/pbulk/build/net/socks4/work/socks.cstc.4.2/sockd clang -I../include -I../libident -pipe -Os -Wno-error=return-type -DSUPPORT_RCMD -o sockd sockd.c /Users/pbulk/build/net/socks4/work/socks.cstc.4.2/lib/libsocks.a /Users/pbulk/build/net/socks4/work/socks.cstc.4.2/libident/libident.a sockd.c:89:2: warning: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Wimplicit-function-declaration] exit(1); ^ sockd.c:89:2: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit' sockd.c:99:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] main(argc, argv) ^ sockd.c:306:7: warning: implicit declaration of function 'dup' is invalid in C99 [-Wimplicit-function-declaration] in = dup(0); ^ sockd.c:309:48: warning: passing 'int *' to parameter of type 'socklen_t *' (aka 'unsigned int *') converts between pointers to integer types with different sign [-Wpointer-sign] if (getpeername(in, (struct sockaddr *)&from, &fromlen) < 0) { ^~~~~~~~ /Applications/Xcode-13.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/sys/socket.h:708:78: note: passing argument to parameter here int getpeername(int, struct sockaddr * __restrict, socklen_t * __restrict) ^ sockd.c:320:6: warning: implicit declaration of function 'socks_GetDst' is invalid in C99 [-Wimplicit-function-declaration] if (socks_GetDst(in, &dst) < 0) { ^ sockd.c:341:9: warning: implicit declaration of function 'read' is invalid in C99 [-Wimplicit-function-declaration] while (read(in, &c, 1) == 1) ^ sockd.c:355:11: warning: implicit declaration of function 'Validate' is invalid in C99 [-Wimplicit-function-declaration] permit = Validate(&from, &dstsin, in); ^ sockd.c:387:3: warning: implicit declaration of function 'socks_SendDst' is invalid in C99 [-Wimplicit-function-declaration] socks_SendDst(in, &dst); ^ sockd.c:393:3: warning: implicit declaration of function 'socks_SendDst' is invalid in C99 [-Wimplicit-function-declaration] socks_SendDst(in, &dst); ^ sockd.c:415:2: warning: implicit declaration of function 'alarm' is invalid in C99 [-Wimplicit-function-declaration] alarm(60*2); ^ sockd.c:418:3: warning: implicit declaration of function 'DoConnect' is invalid in C99 [-Wimplicit-function-declaration] DoConnect(in, &dst); ^ sockd.c:421:3: warning: implicit declaration of function 'DoNewBind' is invalid in C99 [-Wimplicit-function-declaration] DoNewBind(in, &dst); ^ sockd.c:425:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] socks_fail(str, in, ndst) ^ sockd.c:432:2: warning: implicit declaration of function 'socks_SendDst' is invalid in C99 [-Wimplicit-function-declaration] socks_SendDst(in, ndst); ^ sockd.c:440:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] DoConnect(in, dst) ^ sockd.c:460:14: warning: implicit declaration of function 'rresvport' is invalid in C99 [-Wimplicit-function-declaration] if ((out = rresvport(&outport)) < 0) ^ sockd.c:466:24: warning: implicit declaration of function 'getpid' is invalid in C99 [-Wimplicit-function-declaration] fcntl(out, F_SETOWN, getpid()); ^ sockd.c:490:2: warning: implicit declaration of function 'socks_SendDst' is invalid in C99 [-Wimplicit-function-declaration] socks_SendDst(in, &ndst); ^ sockd.c:491:2: warning: implicit declaration of function 'Pump' is invalid in C99 [-Wimplicit-function-declaration] Pump(in, out); ^ sockd.c:494:1: warning: non-void function does not return a value [-Wreturn-type] } ^ sockd.c:502:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] DoNewBind(in, dst) ^ sockd.c:535:13: warning: implicit declaration of function 'rresvport' is invalid in C99 [-Wimplicit-function-declaration] if((out = rresvport(&outport)) < 0) ^ sockd.c:544:24: warning: implicit declaration of function 'getpid' is invalid in C99 [-Wimplicit-function-declaration] fcntl(out, F_SETOWN, getpid()); ^ sockd.c:559:48: warning: passing 'int *' to parameter of type 'socklen_t *' (aka 'unsigned int *') converts between pointers to integer types with different sign [-Wpointer-sign] if (getsockname(out, (struct sockaddr *)&sin, &len) < 0) ^~~~ /Applications/Xcode-13.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/sys/socket.h:710:78: note: passing argument to parameter here int getsockname(int, struct sockaddr * __restrict, socklen_t * __restrict) ^ sockd.c:571:2: warning: implicit declaration of function 'socks_SendDst' is invalid in C99 [-Wimplicit-function-declaration] socks_SendDst(in, &ndst); ^ sockd.c:574:50: warning: passing 'int *' to parameter of type 'socklen_t *' (aka 'unsigned int *') converts between pointers to integer types with different sign [-Wpointer-sign] if ((new = accept(out, (struct sockaddr *)&sin, &len)) < 0) ^~~~ /Applications/Xcode-13.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/sys/socket.h:704:73: note: passing argument to parameter here int accept(int, struct sockaddr * __restrict, socklen_t * __restrict) ^ sockd.c:579:2: warning: implicit declaration of function 'close' is invalid in C99 [-Wimplicit-function-declaration] close(out); ^ sockd.c:609:2: warning: implicit declaration of function 'Pump' is invalid in C99 [-Wimplicit-function-declaration] Pump(in, new); ^ sockd.c:612:1: warning: non-void function does not return a value in all control paths [-Wreturn-type] } ^ sockd.c:617:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] Pump(in, out) ^ sockd.c:628:2: warning: implicit declaration of function 'alarm' is invalid in C99 [-Wimplicit-function-declaration] alarm(0); ^ sockd.c:655:14: warning: implicit declaration of function 'read' is invalid in C99 [-Wimplicit-function-declaration] if ((n = read(in, buf, sizeof buf)) > 0) { ^ sockd.c:657:10: warning: implicit declaration of function 'write' is invalid in C99 [-Wimplicit-function-declaration] if (write(out, buf, n) < 0) { ^ sockd.c:665:14: warning: implicit declaration of function 'read' is invalid in C99 [-Wimplicit-function-declaration] if ((n = read(out, buf, sizeof buf)) > 0) { ^ sockd.c:667:10: warning: implicit declaration of function 'write' is invalid in C99 [-Wimplicit-function-declaration] if (write(in, buf, n) < 0) { ^ sockd.c:684:1: warning: non-void function does not return a value [-Wreturn-type] } ^ sockd.c:874:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] check_sp_conf(fd, s, src, dst) ^ sockd.c:884:4: warning: implicit declaration of function 'socks_shell_cmd' is invalid in C99 [-Wimplicit-function-declaration] socks_shell_cmd(buf+strlen(s), src, dst); ^ sockd.c:888:2: warning: non-void function 'check_sp_conf' should return a value [-Wreturn-type] return; ^ sockd.c:891:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] Validate(src, dst, in) ^ sockd.c:1129:4: warning: implicit declaration of function 'socks_shell_cmd' is invalid in C99 [-Wimplicit-function-declaration] socks_shell_cmd(cmdp, src, dst); ^ sockd.c:1155:3: warning: implicit declaration of function 'socks_shell_cmd' is invalid in C99 [-Wimplicit-function-declaration] socks_shell_cmd(cmdp, src, dst); ^ 42 warnings generated. (cd rfinger; /opt/pkg/bin/bmake CC="clang" WHOIS_SERVER=-DWHOIS_SERVER\'=\"rs.internic.net\"\' OPTIMIZE="-pipe -Os -Wno-error=return-type" SOCKS="-Dconnect=Rconnect -Dgetsockname=Rgetsockname -Dlisten=Rlisten -Daccept=Raccept -Drcmd=Rrcmd -Dbind=Rbind -Dselect=Rselect -Dunix=1" RESOLV_LIB="" SOCKS_LIB="/Users/pbulk/build/net/socks4/work/socks.cstc.4.2/lib/libsocks.a" OTHER_CFLAGS=" ") /Users/pbulk/build/net/socks4/work/socks.cstc.4.2/rfinger clang -DWHOIS_SERVER'="rs.internic.net"' -I../include -pipe -Os -Wno-error=return-type -Dconnect=Rconnect -Dgetsockname=Rgetsockname -Dlisten=Rlisten -Daccept=Raccept -Drcmd=Rrcmd -Dbind=Rbind -Dselect=Rselect -Dunix=1 -o rwhois finger.c /Users/pbulk/build/net/socks4/work/socks.cstc.4.2/lib/libsocks.a finger.c:56:2: warning: implicit declaration of function 'SOCKSinit' is invalid in C99 [-Wimplicit-function-declaration] SOCKSinit(Progname); ^ finger.c:60:14: warning: implicit declaration of function 'getopt' is invalid in C99 [-Wimplicit-function-declaration] while ((i = getopt(argc,argv,"h:")) != EOF) { ^ finger.c:67:4: warning: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Wimplicit-function-declaration] exit(1); ^ finger.c:67:4: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit' finger.c:74:3: warning: implicitly declaring library function 'strcat' with type 'char *(char *, const char *)' [-Wimplicit-function-declaration] strcat(cp, " "); ^ finger.c:74:3: note: include the header <string.h> or explicitly provide a declaration for 'strcat' finger.c:76:10: warning: implicitly declaring library function 'strcmp' with type 'int (const char *, const char *)' [-Wimplicit-function-declaration] if (strcmp(argv[i], "-l")) { ^ finger.c:76:10: note: include the header <string.h> or explicitly provide a declaration for 'strcmp' finger.c:78:9: warning: implicitly declaring library function 'strlen' with type 'unsigned long (const char *)' [-Wimplicit-function-declaration] cp += strlen(argv[i]); ^ finger.c:78:9: note: include the header <string.h> or explicitly provide a declaration for 'strlen' finger.c:101:12: warning: implicit declaration of function 'atoi' is invalid in C99 [-Wimplicit-function-declaration] if ((v = atoi(service)) == 0) { ^ finger.c:112:12: warning: implicit declaration of function 'inet_addr' is invalid in C99 [-Wimplicit-function-declaration] if ((l = inet_addr(host)) == -1) { ^ finger.c:123:4: warning: implicit declaration of function 'bcopy' is invalid in C99 [-Wimplicit-function-declaration] bcopy(*hp->h_addr_list, &(dstaddr[i].s_addr), hp->h_length); ^ finger.c:135:20: warning: incompatible pointer types passing 'struct sockaddr_in *' to parameter of type 'const struct sockaddr *' [-Wincompatible-pointer-types] while (connect(s, &sin, sizeof(sin)) < 0) { ^~~~ /Applications/Xcode-13.4.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/sys/socket.h:707:45: note: passing argument to parameter here int connect(int, const struct sockaddr *, socklen_t) __DARWIN_ALIAS_C(connect); ^ finger.c:146:10: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] if (*cp = ' ') cp++; ~~~~^~~~~ finger.c:146:10: note: place parentheses around the assignment to silence this warning if (*cp = ' ') cp++; ^ ( ) finger.c:146:10: note: use '==' to turn this assignment into an equality comparison if (*cp = ' ') cp++; ^ == finger.c:149:6: warning: implicit declaration of function 'write' is invalid in C99 [-Wimplicit-function-declaration] if (write(s,cp,strlen(cp)) < 0) { ^ finger.c:154:14: warning: implicit declaration of function 'read' is invalid in C99 [-Wimplicit-function-declaration] while ((n = read(s, buf, sizeof(buf) - 1)) > 0) { ^ finger.c:158:2: warning: implicit declaration of function 'close' is invalid in C99 [-Wimplicit-function-declaration] close(s); ^ 14 warnings generated. Undefined symbols for architecture arm64: "_res_9_init", referenced from: _SOCKSinit in libsocks.a(Rconnect.o) ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) *** [rwhois] Error code 1 bmake[1]: stopped in /Users/pbulk/build/net/socks4/work/socks.cstc.4.2/rfinger 1 error bmake[1]: stopped in /Users/pbulk/build/net/socks4/work/socks.cstc.4.2/rfinger *** [RFINGER] Error code 2 bmake: stopped in /Users/pbulk/build/net/socks4/work/socks.cstc.4.2 1 error bmake: stopped in /Users/pbulk/build/net/socks4/work/socks.cstc.4.2 *** Error code 2 Stop. bmake[1]: stopped in /Volumes/data/jenkins/workspace/pkgsrc-macos-trunk-arm64/net/socks4 *** Error code 1 Stop. bmake: stopped in /Volumes/data/jenkins/workspace/pkgsrc-macos-trunk-arm64/net/socks4