From owner-freebsd-bugs@FreeBSD.ORG Sun Aug 1 12:10:04 2010 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 212EB106566C for ; Sun, 1 Aug 2010 12:10:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id D89E18FC1D for ; Sun, 1 Aug 2010 12:10:03 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o71CA3CH062278 for ; Sun, 1 Aug 2010 12:10:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o71CA39i062277; Sun, 1 Aug 2010 12:10:03 GMT (envelope-from gnats) Resent-Date: Sun, 1 Aug 2010 12:10:03 GMT Resent-Message-Id: <201008011210.o71CA39i062277@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Robert Millan Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 92D65106566C for ; Sun, 1 Aug 2010 12:01:19 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 807BD8FC2F for ; Sun, 1 Aug 2010 12:01:19 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o71C1JqP026008 for ; Sun, 1 Aug 2010 12:01:19 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id o71C1JfK026007; Sun, 1 Aug 2010 12:01:19 GMT (envelope-from nobody) Message-Id: <201008011201.o71C1JfK026007@www.freebsd.org> Date: Sun, 1 Aug 2010 12:01:19 GMT From: Robert Millan To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: misc/149173: [patch] [zfs] make OpenSolaris installable X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Aug 2010 12:10:04 -0000 >Number: 149173 >Category: misc >Synopsis: [patch] [zfs] make OpenSolaris installable >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Aug 01 12:10:03 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Robert Millan >Release: >Organization: >Environment: >Description: This patch makes OpenSolaris buildable outside the compatibility environment, so that it can be installed system-wide, along with , making it easier for third party apps to link with libnvpair. It's been forwarded to OpenSolaris BTS already: - https://defect.opensolaris.org/bz/show_bug.cgi?id=16697#c0 See also the discussion on GRUB list [1] about this problem: - http://osdir.com/ml/grub-devel-gnu/2010-07/msg00263.html [1] I'm in the process of adding support to GRUB for booting from ZFS >How-To-Repeat: >Fix: Patch attached with submission follows: --- sys/nvpair.h.old 2010-07-31 12:03:02.038737593 -0400 +++ sys/nvpair.h 2010-07-31 12:03:08.926873793 -0400 @@ -32,6 +32,18 @@ #include #include +/* for non-OpenSolaris systems */ +#if !defined(_KERNEL) && !defined(_BOOT) +#include /* uintxx_t */ +#include /* va_list */ +typedef unsigned int uint_t; +typedef unsigned char uchar_t; +typedef enum { B_FALSE, B_TRUE } boolean_t; +typedef long long hrtime_t; +#else +typedef __va_list va_list; +#endif + #if defined(_KERNEL) && !defined(_BOOT) #include #endif @@ -133,7 +145,7 @@ } nv_alloc_t; struct nv_alloc_ops { - int (*nv_ao_init)(nv_alloc_t *, __va_list); + int (*nv_ao_init)(nv_alloc_t *, va_list); void (*nv_ao_fini)(nv_alloc_t *); void *(*nv_ao_alloc)(nv_alloc_t *, size_t); void (*nv_ao_free)(nv_alloc_t *, void *, size_t); >Release-Note: >Audit-Trail: >Unformatted: