From owner-svn-src-all@freebsd.org Tue Aug 8 10:31:44 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 13C5BDD1C04; Tue, 8 Aug 2017 10:31:44 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 CE1397D96A; Tue, 8 Aug 2017 10:31:43 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v78AVgkJ023945; Tue, 8 Aug 2017 10:31:42 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v78AVgTo023944; Tue, 8 Aug 2017 10:31:42 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201708081031.v78AVgTo023944@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 8 Aug 2017 10:31:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r322219 - vendor-sys/illumos/dist/uts/common/fs/zfs/sys X-SVN-Group: vendor-sys X-SVN-Commit-Author: avg X-SVN-Commit-Paths: vendor-sys/illumos/dist/uts/common/fs/zfs/sys X-SVN-Commit-Revision: 322219 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Aug 2017 10:31:44 -0000 Author: avg Date: Tue Aug 8 10:31:42 2017 New Revision: 322219 URL: https://svnweb.freebsd.org/changeset/base/322219 Log: 8416 abd.h is not C++ friendly illumos/illumos-gate@5e2a074725cb7c16ea1c6554da11ab4d6b4e7aee https://github.com/illumos/illumos-gate/commit/5e2a074725cb7c16ea1c6554da11ab4d6b4e7aee https://www.illumos.org/issues/8416 A C++ compiler fails to compile abd_is_linear(), which is an inline function defined in abd.h, with the following error: error: cannot initialize return object of type 'boolean_t' with an rvalue of type 'bool' That happens because a bool can not be converted to an enum in C++. That's a problem because abd.h can be visible through other header files that a C++ program that works with ZFS can include. Reviewed by: Igor Kozhukhov Reviewed by: Dan Kimmel Reviewed by: Alek Pinchuk Approved by: Robert Mustacchi Author: Andriy Gapon Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/abd.h Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/abd.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/abd.h Tue Aug 8 10:30:49 2017 (r322218) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/abd.h Tue Aug 8 10:31:42 2017 (r322219) @@ -60,7 +60,7 @@ extern boolean_t zfs_abd_scatter_enabled; inline boolean_t abd_is_linear(abd_t *abd) { - return ((abd->abd_flags & ABD_FLAG_LINEAR) != 0); + return ((abd->abd_flags & ABD_FLAG_LINEAR) != 0 ? B_TRUE : B_FALSE); } /*