From owner-freebsd-hackers@freebsd.org Mon Dec 16 17:27:01 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CD5F41C992A for ; Mon, 16 Dec 2019 17:27:01 +0000 (UTC) (envelope-from kennethg@trueworldfoods.com) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on20615.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe5a::615]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "GlobalSign Organization Validation CA - SHA256 - G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47c7Vq627Xz44Gv for ; Mon, 16 Dec 2019 17:26:59 +0000 (UTC) (envelope-from kennethg@trueworldfoods.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gKcaMrafKI/p1Io6mlLmp75T3vilolj9fjZZIJfkaMXz5qxWt7g//EdWobk9Rwdx+CnNTWGadbSVmJtRc42jt+TKWQuGLsZS1D+vEu4GYZYtbucCWoYQP/8QVrZmxxRBYXg8EXx1tVAHmN4yLIOn6WJlyS/n9+0CgZeMoD+pothnh4CRCpF00aVYcTrGe5KN6ab6RxOPf+sPlwtJgg19CaebPvDyvXX82JMLnnBqFeTdnBYY/M0LV1iKa88Ix6SGOrVHoMlAfeJTmPk6738F375Xti8MxS/JoFMh/oD3fTrgHriV8FFCHtgqX8bNDq8RCyLQPUrHIeJGYEzJrknKdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jt7Z3l0GYO6hoU/1q5OjuzsebX9ekr/YUnMT5O4S2T4=; b=DT1smHTxhjGGqj+zfgSCR5oCGLt0IfOox5i9hhi66m/cLwCmwUVEEcRyIAt9uleqi5RTxGAryDeZNHX/1oSUBA9SC0abZLvlYUhrnpTyXIUkWbNwefEVU7E04dqMqL4lui+ldzvVj3sRfS6BQqLSaee1dOslOzArgVsRSNVWiv+zz9+ioxIBuB5R+cZQzrc67Z51o8qfEESoaLJO38F5JltoGdgBFeDTon25DYBS/oGpiyHPyy72HX6qkmRXhp9kX5bMXjU5OCPHOcHJKpJkiRIgmsEpso8Ed6/KNrBvBkZKG6UCce9txOmum/xG+h/LM977gxw5ngwvGZf7UgxpHQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=trueworldfoods.com; dmarc=pass action=none header.from=trueworldfoods.com; dkim=pass header.d=trueworldfoods.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trueworldgroup.onmicrosoft.com; s=selector2-trueworldgroup-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jt7Z3l0GYO6hoU/1q5OjuzsebX9ekr/YUnMT5O4S2T4=; b=QfuKn1tsD06oJMleplRAU+t02KGPI5a73akvAopCup38BssxXMIYC1TzWSADHtTwx3oGC5nGzrYCnhKoITo6ysEtT9gOhB71Bzkr39u/hiG7dIv0+PEolleBJ6pAT84dMc2iGVCkuaPJrMDR4YXYDW1dwcTam+syLMQfTD8fQGY= Received: from CY4PR13MB1861.namprd13.prod.outlook.com (10.171.166.9) by CY4PR13MB1751.namprd13.prod.outlook.com (10.171.166.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2559.12; Mon, 16 Dec 2019 17:26:55 +0000 Received: from CY4PR13MB1861.namprd13.prod.outlook.com ([fe80::bc4a:a1cf:5e59:6a8]) by CY4PR13MB1861.namprd13.prod.outlook.com ([fe80::bc4a:a1cf:5e59:6a8%9]) with mapi id 15.20.2559.012; Mon, 16 Dec 2019 17:26:55 +0000 From: "Kenneth M. Glassey" To: "freebsd-hackers@FreeBSD.org" Subject: How to compile 'struct module' usage? Thread-Topic: How to compile 'struct module' usage? Thread-Index: AQHVtDUdCTlgrIuZ8UOCK9k+XVKOJA== Date: Mon, 16 Dec 2019 17:26:55 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [173.8.148.41] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 60df8db8-ecf7-4cab-6055-08d7824d2606 x-ms-traffictypediagnostic: CY4PR13MB1751: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-forefront-prvs: 02530BD3AA x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(346002)(376002)(396003)(366004)(39850400004)(189003)(199004)(7696005)(5660300002)(76116006)(8676002)(4744005)(478600001)(316002)(8936002)(66476007)(64756008)(33656002)(66946007)(52536014)(66556008)(71200400001)(66446008)(81166006)(81156014)(19627405001)(2906002)(6916009)(55016002)(9686003)(26005)(6506007)(186003)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR13MB1751; H:CY4PR13MB1861.namprd13.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: trueworldfoods.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: eO55dilgObv/3vvla+2xLg4QbedrxyYjlZZRHaeTBJQeHMFXNTliJWMH7MJjQeqkA9Bs7t45EmGI78Ldqp3Q8Y4zpAJvBQfSCp1AF5GkYVXRf/kyyNduz8dTv7dENkxhggXDRZx8QFfV/FonWjd697XKKW+NrSmHcXMXg7xYao5VDcm2gTeREOvVPVDxPBxi+cHSkODEQ5L1sElC6ue21b+zc2GPv8pFqmI7ZE96XSQ7mC0opj1Hd0f0w0/xe4tB07/kFRDhkKNaFz9bpywigIaXU4CeLy+Kqrf1nb+Tapq8vubZz9VaJfrNDhaAjq/AEvgCpx0/3ZDMwnGVhwLBTv3Vm3XCKMjkwL6lxisqboW2yNdeexV37wGp4Mo9Bj8t1Fr0ZIMBq6eyacjAVQrROlYD2n9fTFoGYNvi3+my23ysHKMirMK4sZzd3lbsdxxB x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: trueworldfoods.com X-MS-Exchange-CrossTenant-Network-Message-Id: 60df8db8-ecf7-4cab-6055-08d7824d2606 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Dec 2019 17:26:55.7449 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: eb82689d-b6c4-40de-ace9-083712077da2 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Aqncr727mkqDsflA+xEY59KRsRd8xnsOExqJ0bNeBKCo0Kc7dT+YJIhDVNjuDRtO8e9j4hq4fgaXD3TBJY5swQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR13MB1751 X-Rspamd-Queue-Id: 47c7Vq627Xz44Gv X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=trueworldgroup.onmicrosoft.com header.s=selector2-trueworldgroup-onmicrosoft-com header.b=QfuKn1ts; dmarc=none; spf=pass (mx1.freebsd.org: domain of kennethg@trueworldfoods.com designates 2a01:111:f400:fe5a::615 as permitted sender) smtp.mailfrom=kennethg@trueworldfoods.com X-Spamd-Result: default: False [-3.80 / 15.00]; RCVD_TLS_LAST(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[trueworldgroup.onmicrosoft.com:s=selector2-trueworldgroup-onmicrosoft-com]; HAS_XOIP(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a01:111:f400::/48]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[trueworldfoods.com]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-1.30)[ipnet: 2a01:111:f000::/36(-3.56), asn: 8075(-2.91), country: US(-0.05)]; DKIM_TRACE(0.00)[trueworldgroup.onmicrosoft.com:+]; TO_DN_EQ_ADDR_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:8075, ipnet:2a01:111:f000::/36, country:US]; ARC_ALLOW(-1.00)[i=1] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Dec 2019 17:27:01 -0000 Hello, I am doing some fiddling on a driver port and I am encountering a compilation error "incomplete definition of type struct module" concerning lines in the port source that access members of struct module, such as module->name. Looking into the issue, it seems that struct module is not defined in the headers, at least not in sys/module.h, but I did see some definitions in *.c files elsewhere. To check whether this was a problem specifically due to this driver, I made a simple module following one of the tutorials online and it compiled fine. I then added a line that accessed module->name and I got the compilation error. So how do we build a module to allow the use of the members of struct module? Is the struct module definition supposed to be constructed at compile time, and if so, how? Or is it verboten to access members of that struct? Thanks! Kenneth