Date: Thu, 21 Mar 2024 20:01:56 +0200 From: Jussi Korkala <jussi.korkala@icloud.com> To: Michael Grimm <trashcan@ellael.org> Cc: FreeBSD Mailing List <freebsd-ports@freebsd.org> Subject: Re: SO_PASSCRED and SCM_CREDENTIALS | error: use of undeclared identifier Message-ID: <2A35092C-FD32-4A3E-AAAC-89AA55A86D21@icloud.com> In-Reply-To: <0CF935BF-0DD4-423B-91BF-38FEF1DC374E@ellael.org> References: <0CF935BF-0DD4-423B-91BF-38FEF1DC374E@ellael.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Did you get binaries? If so, install manually. Best regards, Jussi Korkala > On 20. Mar 2024, at 22.16, Michael Grimm <trashcan@ellael.org> wrote: >=20 > =EF=BB=BFHi >=20 > Disclaimer: >=20 > I am trying to create a new port (knot-resolver-current) developed under L= inux upstream. A so-called manager functionality is brand new in comparison t= o the previous knot-resolver. The corresponding git repository is leading ed= ge development. >=20 > My main motivation is: learning how to create ports ;-) >=20 >=20 > Compilation fails: >=20 > cc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -= O2 -pipe -fstack-protector-strong -fno-strict-aliasing -fPIC -I/usr/local/in= clude/python3.9 -c knot_resolver_manager/kresd_controller/supervisord/plugin= /notifymodule.c -o build/temp.freebsd-14.0-STABLE-amd64-cpython-39/knot_reso= lver_manager/kresd_controller/supervisord/plugin/notifymodule.o > knot_resolver_manager/kresd_controller/supervisord/plugin/notifymodule.c:5= 2:42: error: use of undeclared identifier 'SO_PASSCRED' > 52 | res =3D setsockopt(controlfd, SOL_SOCKET, SO_PASSCRED, &dat= a, > | ^ > knot_resolver_manager/kresd_controller/supervisord/plugin/notifymodule.c:9= 7:23: error: invalid application of 'sizeof' to an incomplete type 'struct u= cred' > 97 | char cmsg[CMSG_SPACE(sizeof(struct ucred))]; > | ^ ~~~~~~~~~~~~~~ > /usr/include/sys/socket.h:577:65: note: expanded from macro 'CMSG_SPACE' > 577 | #define CMSG_SPACE(l) (_ALIGN(sizeof(struct cmsghdr)) + _= ALIGN(l)) > | = ^ > /usr/include/x86/_align.h:51:35: note: expanded from macro '_ALIGN' > 51 | #define _ALIGN(p) (((__uintptr_t)(p) + _ALIGNBYTES) & ~_ALIGN= BYTES) > | ^ > knot_resolver_manager/kresd_controller/supervisord/plugin/notifymodule.c:9= 7:37: note: forward declaration of 'struct ucred' > 97 | char cmsg[CMSG_SPACE(sizeof(struct ucred))]; > | ^ > knot_resolver_manager/kresd_controller/supervisord/plugin/notifymodule.c:1= 16:27: error: use of undeclared identifier 'SCM_CREDENTIALS' > 116 | if (cmsgp->cmsg_type =3D=3D SCM_CREDENTIALS) { > | ^ > knot_resolver_manager/kresd_controller/supervisord/plugin/notifymodule.c:1= 18:36: error: invalid application of 'sizeof' to an incomplete type 'struct u= cred' > 118 | cmsgp->cmsg_len !=3D CMSG_LEN(sizeof(struct= ucred)) || > | ^ ~~~~~~~~~= ~~~~~ > /usr/include/sys/socket.h:578:57: note: expanded from macro 'CMSG_LEN' > 578 | #define CMSG_LEN(l) (_ALIGN(sizeof(struct cmsghdr)) + (= l)) > | ^= > knot_resolver_manager/kresd_controller/supervisord/plugin/notifymodule.c:9= 7:37: note: forward declaration of 'struct ucred' > 97 | char cmsg[CMSG_SPACE(sizeof(struct ucred))]; > | ^ > knot_resolver_manager/kresd_controller/supervisord/plugin/notifymodule.c:1= 25:17: error: variable has incomplete type 'struct ucred' > 125 | struct ucred cred; > | ^ > knot_resolver_manager/kresd_controller/supervisord/plugin/notifymodule.c:9= 7:37: note: forward declaration of 'struct ucred' > 97 | char cmsg[CMSG_SPACE(sizeof(struct ucred))]; > | ^ > 5 errors generated. > error: command '/usr/bin/cc' failed with exit code 1 > FAILED: install script '/bin/bash /wrkdirs/usr/ports/dns/knot-resolver-cur= rent/work/knot-resolver-v6.0.6/manager/scripts/install.sh /usr/local/bin/pyt= hon3' failed with exit code 1. >=20 >=20 > Both SO_PASSCRED and SCM_CREDENTIALS aren't defined in the complete git re= pository. >=20 >=20 > Is there a way to include Linux compatibility regarding sockets? >=20 >=20 > Thanks and regards, > Michael >=20 >=20
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2A35092C-FD32-4A3E-AAAC-89AA55A86D21>