From nobody Thu Mar 21 18:01:56 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 4V0tZy1smLz5FB4f for ; Thu, 21 Mar 2024 18:02:18 +0000 (UTC) (envelope-from jussi.korkala@icloud.com) Received: from qs51p00im-qukt01071901.me.com (qs51p00im-qukt01071901.me.com [17.57.155.8]) (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 4V0tZx41gfz467H for ; Thu, 21 Mar 2024 18:02:17 +0000 (UTC) (envelope-from jussi.korkala@icloud.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1711044130; bh=O9qfsOie8SlUhn/89iC/zhnIpV5Oa1gNRlT1BYU+oas=; h=Content-Type:From:Mime-Version:Subject:Date:Message-Id:To; b=mNgxKV63wX++3ppnmrKizSclcjAW03cZYA88S06hwXITG2BkrnikDcxlc2uuEQ3VA NAwLknISEhUrfd/E3BQHCtRjyHgOiBKvs7KglwNmlauiCOlSceP/xweHe3UEYVYNrv +quBDSKvttONYXbiNkdWV+WTtxjtGtoJe+XyautVv2Jn04Eny3NO5RvmwN4Jz+PPEZ xt6OKMvuo++uugfiNe/BMZZvB2+VZW/7e0vG896V6ReRrYVQ5tJmu3jdKfltpi1MpY ZJqkL7+1+BlIQJs4CAEsYfOpmNOC0sYHQWItW4ckGjQvmn0dWARc+6BkYh3DtqVPPa LpHmPp0ou4Mhw== Received: from smtpclient.apple (qs51p00im-dlb-asmtp-mailmevip.me.com [17.57.155.28]) by qs51p00im-qukt01071901.me.com (Postfix) with ESMTPSA id CD886628057F; Thu, 21 Mar 2024 18:02:09 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Jussi Korkala 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 (1.0) Subject: Re: SO_PASSCRED and SCM_CREDENTIALS | error: use of undeclared identifier Date: Thu, 21 Mar 2024 20:01:56 +0200 Message-Id: <2A35092C-FD32-4A3E-AAAC-89AA55A86D21@icloud.com> References: <0CF935BF-0DD4-423B-91BF-38FEF1DC374E@ellael.org> Cc: FreeBSD Mailing List In-Reply-To: <0CF935BF-0DD4-423B-91BF-38FEF1DC374E@ellael.org> To: Michael Grimm X-Mailer: iPhone Mail (21E219) X-Proofpoint-ORIG-GUID: 6pCJ4jKaFLDqF3d4aVb_5pPq-hjxbfA5 X-Proofpoint-GUID: 6pCJ4jKaFLDqF3d4aVb_5pPq-hjxbfA5 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-21_11,2024-03-21_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 spamscore=0 adultscore=0 malwarescore=0 phishscore=0 clxscore=1011 mlxscore=0 mlxlogscore=999 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2308100000 definitions=main-2403210132 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:714, ipnet:17.57.155.0/24, country:US] X-Rspamd-Queue-Id: 4V0tZx41gfz467H Did you get binaries? If so, install manually. Best regards, Jussi Korkala > On 20. Mar 2024, at 22.16, Michael Grimm 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