From nobody Wed Mar 20 20:16:08 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 4V0Kc76qSnz5Dqvc for ; Wed, 20 Mar 2024 20:16:23 +0000 (UTC) (envelope-from trashcan@ellael.org) Received: from mx2.enfer-du-nord.net (mx2.enfer-du-nord.net [135.125.211.209]) (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 4V0Kc66Jfcz4N7x for ; Wed, 20 Mar 2024 20:16:22 +0000 (UTC) (envelope-from trashcan@ellael.org) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=ellael.org header.s=dkim header.b=NrMJ1c+L; dmarc=pass (policy=quarantine) header.from=ellael.org; spf=pass (mx1.freebsd.org: domain of trashcan@ellael.org designates 135.125.211.209 as permitted sender) smtp.mailfrom=trashcan@ellael.org Received: from smtpclient.apple (p200300fb4f024a01308be648b787b1b5.dip0.t-ipconnect.de [IPv6:2003:fb:4f02:4a01:308b:e648:b787:b1b5]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx2.enfer-du-nord.net (Postfix) with ESMTPSA id 4V0Kc31CLKz1mDY for ; Wed, 20 Mar 2024 21:16:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellael.org; s=dkim; t=1710965779; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xn/wTANEQoAE6hE2WXR1XkN+v83Sa5jHcucLYRbNO9M=; b=NrMJ1c+LqZaIqRWpWtOb88EtzBMBucfL9lguFfaipLAvb0mL0Ev6dIpN3bstqpgmM5IY+B Xi+hjxLBNTFbVLXVUD0kYmRxgQAuSMqIsE2XVHz/K7w7X3E0EHcRmqddyVILkYPzHyFvxp DWFjAWGTWlZZX1Fl+HA22mpTPKD3tvwNy94LT41zsFsLs3SJLMz3kPvA3+94SMaPqj6eEf oG1gnsRuoDyUO++efJHhKOS56mHS+PnTXn+W+IquA8f6HCa6TFkthAUtFmqNYdByGdawOA r/DdD7ciKHzjqJ4o3gIkPoJLoafx+Z+JGQi2WDpQ8DWtYrDgZNv+0KtP7GMZug== From: Michael Grimm Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable 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: SO_PASSCRED and SCM_CREDENTIALS | error: use of undeclared identifier Message-Id: <0CF935BF-0DD4-423B-91BF-38FEF1DC374E@ellael.org> Date: Wed, 20 Mar 2024 21:16:08 +0100 To: FreeBSD Mailing List X-Mailer: Apple Mail (2.3774.500.171.1.1) X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.81 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.91)[-0.911]; SUBJECT_ENDS_SPACES(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[ellael.org,quarantine]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:135.125.211.209]; R_DKIM_ALLOW(-0.20)[ellael.org:s=dkim]; MIME_GOOD(-0.10)[text/plain]; ONCE_RECEIVED(0.10)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_ALL(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[]; DKIM_TRACE(0.00)[ellael.org:+]; ASN(0.00)[asn:16276, ipnet:135.125.128.0/17, country:FR]; MIME_TRACE(0.00)[0:+]; PREVIOUSLY_DELIVERED(0.00)[freebsd-ports@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; MLMMJ_DEST(0.00)[freebsd-ports@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[135.125.211.209:from] X-Rspamd-Queue-Id: 4V0Kc66Jfcz4N7x Hi Disclaimer: I am trying to create a new port (knot-resolver-current) developed under = Linux upstream. A so-called manager functionality is brand new in = comparison to the previous knot-resolver. The corresponding git = repository is leading edge development. My main motivation is: learning how to create ports ;-) Compilation fails: 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, | ^ = knot_resolver_manager/kresd_controller/supervisord/plugin/notifymodule.c:9= 7:23: error: invalid application of 'sizeof' to an incomplete type = 'struct ucred' 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) & = ~_ALIGNBYTES) | ^ = 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 ucred' 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-current/work/knot-resolver-v6.0.6/man= ager/scripts/install.sh /usr/local/bin/python3' failed with exit code 1. Both SO_PASSCRED and SCM_CREDENTIALS aren't defined in the complete git = repository. Is there a way to include Linux compatibility regarding sockets?=20 Thanks and regards, Michael