From owner-freebsd-bugs@FreeBSD.ORG Tue Jul 27 23:40:02 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 2F60A1065674 for ; Tue, 27 Jul 2010 23:40:02 +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 0D5FE8FC0C for ; Tue, 27 Jul 2010 23:40:02 +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 o6RNe1an065884 for ; Tue, 27 Jul 2010 23:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o6RNe1it065883; Tue, 27 Jul 2010 23:40:01 GMT (envelope-from gnats) Resent-Date: Tue, 27 Jul 2010 23:40:01 GMT Resent-Message-Id: <201007272340.o6RNe1it065883@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, Tuco Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 447B81065676 for ; Tue, 27 Jul 2010 23:31:41 +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 198818FC1D for ; Tue, 27 Jul 2010 23:31:41 +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 o6RNVegU024883 for ; Tue, 27 Jul 2010 23:31:40 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id o6RNVeTm024882; Tue, 27 Jul 2010 23:31:40 GMT (envelope-from nobody) Message-Id: <201007272331.o6RNVeTm024882@www.freebsd.org> Date: Tue, 27 Jul 2010 23:31:40 GMT From: Tuco To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: misc/149015: misc fixes for ZFS code to build on Glibc 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: Tue, 27 Jul 2010 23:40:02 -0000 >Number: 149015 >Category: misc >Synopsis: misc fixes for ZFS code to build on Glibc >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Jul 27 23:40:01 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Tuco >Release: Debian GNU/kFreeBSD >Organization: >Environment: >Description: Hello Here's a patch with a few more fixes for ZFS code to build on Glibc, which don't fall in the other categories. >How-To-Repeat: >Fix: Patch attached with submission follows: diff -ur cddl/contrib/opensolaris/head/thread.h cddl/contrib/opensolaris/head/thread.h --- cddl/contrib/opensolaris/head/thread.h 2009-07-09 16:22:05.000000000 -0400 +++ cddl/contrib/opensolaris/head/thread.h 2010-07-26 20:05:56.053037598 -0400 @@ -30,7 +30,10 @@ #pragma ident "%Z%%M% %I% %E% SMI" #include +/* On GNU libc, non-POSIX facilities are in */ +#ifndef __GLIBC__ #include +#endif #include /* diff -ur sys/cddl/compat/opensolaris/sys/sysmacros.h sys/cddl/compat/opensolaris/sys/sysmacros.h --- sys/cddl/compat/opensolaris/sys/sysmacros.h 2009-02-28 11:21:25.000000000 -0500 +++ sys/cddl/compat/opensolaris/sys/sysmacros.h 2010-07-26 18:46:46.357213427 -0400 @@ -103,7 +103,7 @@ * High order bit is 31 (or 63 in _LP64 kernel). */ static __inline int -highbit(ulong_t i) +highbit(unsigned long i) { register int h = 1; diff -ur sys/cddl/compat/opensolaris/sys/time.h sys/cddl/compat/opensolaris/sys/time.h --- sys/cddl/compat/opensolaris/sys/time.h 2008-11-17 15:49:29.000000000 -0500 +++ sys/cddl/compat/opensolaris/sys/time.h 2010-07-27 18:59:40.382806704 -0400 @@ -29,7 +29,12 @@ #ifndef _OPENSOLARIS_SYS_TIME_H_ #define _OPENSOLARIS_SYS_TIME_H_ +/* GNU libc has but no */ +#ifdef __GLIBC__ +#include_next +#else #include_next +#endif #define SEC 1 #define MILLISEC 1000 diff -ur sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c --- sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c 2009-08-15 22:21:24.000000000 -0400 +++ sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c 2010-07-26 19:42:43.000000000 -0400 @@ -2199,11 +2199,11 @@ int err = 0; nvstream_t nvs; int nvl_endian; -#if BYTE_ORDER == _LITTLE_ENDIAN +#if BYTE_ORDER == LITTLE_ENDIAN int host_endian = 1; #else int host_endian = 0; -#endif /* _LITTLE_ENDIAN */ +#endif /* LITTLE_ENDIAN */ nvs_header_t *nvh = (void *)buf; if (buflen == NULL || nvl == NULL || >Release-Note: >Audit-Trail: >Unformatted: