From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28869 invoked by alias); 16 Oct 2014 16:45:51 -0000 Mailing-List: contact crossgcc-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: crossgcc-owner@sourceware.org Received: (qmail 28857 invoked by uid 89); 16 Oct 2014 16:45:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-oi0-f46.google.com Received: from mail-oi0-f46.google.com (HELO mail-oi0-f46.google.com) (209.85.218.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 16 Oct 2014 16:45:49 +0000 Received: by mail-oi0-f46.google.com with SMTP id h136so2963525oig.19 for ; Thu, 16 Oct 2014 09:45:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=CzKgxu9yNEP5ET85Vo6U3CulqRMuIzJRoqx9Y6vMcAg=; b=LTuem7fTA6kE9i2yj8+/1ymXY8r6EyDzdX137KOASBE61HRKy+T50nfleQctG3sSCB GmCW9Ybjqg7YyfmUrkMGrFxBVtlrk+omyyhvoDHRGuu0vkUANpTtEa4zkl5fX4aarP60 jtr7xwVYkMI6MznLcudqCX/If130ZrQHBL1fJfH+lQTNACG43r1d/OfloCAZSXgbefq6 V4VXAIwr9eVbhpCztWY44v3EYCgFdn1JFsFItVf1BePpuFLyIiCHsmXybUytGKcez5QB kYNtdyamHCeLA0GTi82XZsg96qReW6CwmftEW7OrrPFdlooRRYLVCmtuJFal0UzJXBpg VBwg== X-Gm-Message-State: ALoCoQnXKaPGtmzZ0Mrow4e5x8hNY7xExSxYXpZ5juIO5ZdD1jac8lBhtY9qvfNtR4ao2uVXBH3N X-Received: by 10.202.133.1 with SMTP id h1mr1816762oid.49.1413477947485; Thu, 16 Oct 2014 09:45:47 -0700 (PDT) MIME-Version: 1.0 Received: by 10.76.62.12 with HTTP; Thu, 16 Oct 2014 09:45:27 -0700 (PDT) In-Reply-To: References: From: "Jason T. Masker" Date: Thu, 16 Oct 2014 16:45:00 -0000 Message-ID: Subject: Re: [PATCH 1/2] Prevent zconf.gperf from throwing an error on OSX To: Bryan Hundven Cc: crossgcc Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2014-10/txt/msg00023.txt.bz2 Signed-off-by: Jason Masker On Thu, Oct 16, 2014 at 12:32 PM, Bryan Hundven wrote: > Jason, > > On Thu, Oct 16, 2014 at 9:27 AM, Jason T. Masker wrote: >> Updated zconf.gperf patch to be conditional. >> >> The problem is when compiling with clang/LLVM, so not necessarily >> specific to OS X. Offsetof is part of C99 and defined in stddef.h, but >> is builtin with gcc. This code will check for a definition and try >> including stddef.h if it is not found. As a last resort, offsetof will >> be defined. > > You also need to put your sign-off here, for Yann to accept the patch. > >> >> diff --git a/kconfig/zconf.gperf b/kconfig/zconf.gperf >> index c9e690e..d758a2a 100644 >> --- a/kconfig/zconf.gperf >> +++ b/kconfig/zconf.gperf >> @@ -7,6 +7,15 @@ >> %pic >> %struct-type >> >> +%{ >> +# ifndef offsetof >> +# include >> +# ifndef offsetof >> +# define offsetof(st, m) ((size_t)(&((st *)0)->m)) >> +# endif >> +# endif >> +%} >> + >> struct kconf_id; >> >> static struct kconf_id *kconf_id_lookup(register const char *str, >> register unsigned int len); >> >> -- >> For unsubscribe information see http://sourceware.org/lists.html#faq >> > > -Bryan -- For unsubscribe information see http://sourceware.org/lists.html#faq