From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 699 invoked by alias); 16 Oct 2014 16:52:00 -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 687 invoked by uid 89); 16 Oct 2014 16:51:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ob0-f169.google.com Received: from mail-ob0-f169.google.com (HELO mail-ob0-f169.google.com) (209.85.214.169) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 16 Oct 2014 16:51:58 +0000 Received: by mail-ob0-f169.google.com with SMTP id m8so3269292obr.0 for ; Thu, 16 Oct 2014 09:51:56 -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:from:date:message-id:subject:to:cc :content-type; bh=/tZahiEYQ5kHa3EbAp7nNGK819Wso3zqodZk1AhGdpE=; b=NYcOAAo3mAuT1ElSMowyD4z7pnHEcTN3EPHaP87czdHX1rP4u6+U+EaKt+ZKZBDNps ECY7B2Ff/OTQl29seVdX/jAjcID6KuCy0hSPV+eHxPq1l7kbU+LbJPfX9c4UehKzG5cX MNPYMlKNe1qIMklBXB/140CcLq9aLUWCv5W3EbAxyrESLEu0sq+Z1gTky1tclBF+r7ze rXYhCAxiBsaZVxoav2mzGU0NQcznumfGDEP41ABFpmdAMwsrY7B/2A9lNt2s9LI9aEcr zcRZaBmyziIVEHR4zyeZms4Nswxw4Lsj7VPNYYfrrarEWCkazbaBvPzFkmnmL1Ve6GyG /Qog== X-Gm-Message-State: ALoCoQkLZBQQ3emsLMn4rcidK5w8oDnBrOUBEcZbSUfi8fU/5XOlBchdRASMcD5HeXJsH/pn/k9y X-Received: by 10.182.241.195 with SMTP id wk3mr1995595obc.33.1413478310436; Thu, 16 Oct 2014 09:51:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.76.62.12 with HTTP; Thu, 16 Oct 2014 09:51:30 -0700 (PDT) From: "Jason T. Masker" Date: Thu, 16 Oct 2014 16:52:00 -0000 Message-ID: Subject: Re: [PATCH 1/2][RESEND] 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/msg00024.txt.bz2 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. Apologies for the resend. I did not sign off. Signed-off-by: Jason Masker 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