Date: Thu, 21 Mar 2024 18:22:11 +0100 From: Michael Grimm <trashcan@ellael.org> To: FreeBSD Mailing List <freebsd-ports@freebsd.org> Cc: Gleb Popov <arrowd@freebsd.org> Subject: Re: SO_PASSCRED and SCM_CREDENTIALS | error: use of undeclared identifier Message-ID: <DCA65075-B126-474E-B4EE-50FF2493D14E@ellael.org> In-Reply-To: <CALH631mE0G_PPS7_886TQdH1NKUqtQOGc1Rua7e6AhAtwB6t8g@mail.gmail.com> References: <0CF935BF-0DD4-423B-91BF-38FEF1DC374E@ellael.org> <CALH631mE0G_PPS7_886TQdH1NKUqtQOGc1Rua7e6AhAtwB6t8g@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Gleb Popov <arrowd@freebsd.org> wrote: >=20 > On Wed, Mar 20, 2024 at 11:16=E2=80=AFPM Michael Grimm = <trashcan@ellael.org> wrote: >> 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/include/python3.9 -c = knot_resolver_manager/kresd_controller/supervisord/plugin/notifymodule.c = -o = build/temp.freebsd-14.0-STABLE-amd64-cpython-39/knot_resolver_manager/kres= d_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, = &data, >=20 > This might help you: > = https://github.com/CollaboraOnline/online/commit/8c6cbedd583e80e3c0f93a3e4= 2b3579492da2087 Thanks, that helped a lot! I patched that file as follows: #) included sys/ucred.h #) used LOCAL_PEERCRED instead of SO_PASSCRED #) used 'struct xucred' instead of 'struct ucred' #) used SCM_CREDS instead of SCM_CREDENTIALS #) used cred.cr_pid instead of cred.pid as returned value The file compiles without error, now. But I don't know yet if the socket = will work as expected (some more porting and testing needed). Thanks and regards, Michael
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?DCA65075-B126-474E-B4EE-50FF2493D14E>