From nobody Thu Mar 21 17:22:11 2024 X-Original-To: freebsd-ports@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4V0shx2rpXz5F6cm for ; Thu, 21 Mar 2024 17:22:25 +0000 (UTC) (envelope-from trashcan@ellael.org) Received: from mx1.enfer-du-nord.net (mx1.enfer-du-nord.net [91.121.41.56]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4V0shx0qSDz42FP; Thu, 21 Mar 2024 17:22:24 +0000 (UTC) (envelope-from trashcan@ellael.org) Authentication-Results: mx1.freebsd.org; none Received: from smtpclient.apple (p200300fb4f022a01588946d406e91e0e.dip0.t-ipconnect.de [IPv6:2003:fb:4f02:2a01:5889:46d4:6e9:1e0e]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.enfer-du-nord.net (Postfix) with ESMTPSA id 4V0sht3xk8z1g8S; Thu, 21 Mar 2024 18:22:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellael.org; s=dkim; t=1711041742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rb4UhA0xBeIXdPjwwwDIY1aqIZt4anDRiLLCC0h4ySw=; b=C8AeuMVwfttjEIh9jy0kI3vbv047lWg1julhV9Hmu5Y4x9wzCGRDifHBnBA28qbmKI1rQJ bikQK7TrCxCzcXdhF0d1tgEfdHR4gOYNzvtPai6kFOtflhH2Wmt2k7pPD5PLJsRQb2Bu/E a6C56PGAYscwuavLB1F7nakSK7NWrJKJXGBX95nA370PhA5SN3UbJ1sQ5rf+olr3CpeOv/ 2PTt6PdoZwViNz4zWI03IboCRq7cqK7Z7OavrDzgw+9qM1tlymSWGughIObSqsLwzcrqJJ 4YnLrHtQT9mh0onjEOL8CKkQOm/s2GmCTHaMM/FgWY1FshfXzv1+EqTRnBXVxA== Content-Type: text/plain; charset=utf-8 List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.500.171.1.1\)) Subject: Re: SO_PASSCRED and SCM_CREDENTIALS | error: use of undeclared identifier From: Michael Grimm In-Reply-To: Date: Thu, 21 Mar 2024 18:22:11 +0100 Cc: Gleb Popov Content-Transfer-Encoding: quoted-printable Message-Id: References: <0CF935BF-0DD4-423B-91BF-38FEF1DC374E@ellael.org> To: FreeBSD Mailing List X-Mailer: Apple Mail (2.3774.500.171.1.1) X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16276, ipnet:91.121.0.0/16, country:FR] X-Rspamd-Queue-Id: 4V0shx0qSDz42FP Gleb Popov wrote: >=20 > On Wed, Mar 20, 2024 at 11:16=E2=80=AFPM Michael Grimm = 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