From owner-freebsd-current@freebsd.org Sat Jan 27 16:20:40 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ECEC4EC9A46 for ; Sat, 27 Jan 2018 16:20:39 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 701A16E9B2 for ; Sat, 27 Jan 2018 16:20:39 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: ff9eabbe-037d-11e8-91c6-33ffc249f3e8 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound1.eu.mailhop.org (Halon) with ESMTPSA id ff9eabbe-037d-11e8-91c6-33ffc249f3e8; Sat, 27 Jan 2018 16:20:34 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w0RGKWVU002463; Sat, 27 Jan 2018 09:20:32 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1517070032.84051.6.camel@freebsd.org> Subject: Re: Error compiling isboot-kmod From: Ian Lepore To: John Nielsen , freebsd-current Cc: Warner Losh , Maurizio Vairani Date: Sat, 27 Jan 2018 09:20:32 -0700 In-Reply-To: <09C92929-BC36-4C75-A2F2-0607C9701D40@jnielsen.net> References: <9D0C6C9E-3020-4EC0-97AF-6498FB7356C7@jnielsen.net> <1516988137.42536.255.camel@freebsd.org> <09C92929-BC36-4C75-A2F2-0607C9701D40@jnielsen.net> Content-Type: multipart/mixed; boundary="=-OEf9P6vz26f1zq+0BtTv" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jan 2018 16:20:40 -0000 --=-OEf9P6vz26f1zq+0BtTv Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit On Fri, 2018-01-26 at 23:20 -0700, John Nielsen wrote: > > > > On Jan 26, 2018, at 9:42 PM, John Nielsen wrote: > > > > > > > > [...] > > --- iscsi.o --- > > iscsi.c:1146:3: error: incompatible pointer types passing 'void (struct mbuf *, void *, void *)' to parameter of type 'm_ext_free_t *' (aka 'void (*)(struct mbuf *)') [-Werror,-Wincompatible-pointer-types] > >                MEXTADD(md, (caddr_t)ds_dd, (ISCSI_ALIGN(pp->ds_len) > >                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > /usr/src/sys/sys/mbuf.h:887:42: note: expanded from macro 'MEXTADD' > >    m_extadd((m), (char *)(buf), (size), (free), (arg1), (arg2),        \ > >                                         ^~~~~~ > > /usr/src/sys/sys/mbuf.h:634:59: note: passing argument to parameter here > > void             m_extadd(struct mbuf *, char *, u_int, m_ext_free_t, > Looks like iscsi.c needs to be fixed up following r324446 > (https://svnweb.freebsd.org/changeset/base/324446). Starting to be > out of my depth unless there's a mechanical way to make the changes? > > I'm not set up to test-compile this against -current right now, so I'm not sure if this is all that remains or just another breadcrumb on the trail, but... try the attached patch. -- Ian --=-OEf9P6vz26f1zq+0BtTv Content-Disposition: inline; filename="iscsi_mbuf_free.diff" Content-Type: text/x-patch; name="iscsi_mbuf_free.diff"; charset="ASCII" Content-Transfer-Encoding: 7bit --- iscsi.c.orig 2018-01-27 08:43:26.937858000 -0700 +++ iscsi.c 2018-01-27 09:15:39.631501000 -0700 @@ -1071,17 +1071,23 @@ } -#if __FreeBSD_version >= 1100000 +#if __FreeBSD_version >= 1200051 +static void +isboot_free_mbufext(struct mbuf *m) +{ + void *p = m->m_ext.ext_arg1; +#elif __FreeBSD_version >= 1100000 static void isboot_free_mbufext(struct mbuf *m, void *p, void *optarg) #elif __FreeBSD_version >= 1000050 && __FreeBSD_version < 1100000 static int isboot_free_mbufext(struct mbuf *m, void *p, void *optarg) +{ #else static void isboot_free_mbufext(void *p, void *optarg) -#endif { +#endif ISBOOT_TRACE("isboot_free_mbufext\n"); if (p == NULL) --=-OEf9P6vz26f1zq+0BtTv--