From patchwork Thu Oct 16 16:51:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Masker X-Patchwork-Id: 400328 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id B60D61400D6 for ; Fri, 17 Oct 2014 03:52:07 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:from:date:message-id:subject:to :cc:content-type; q=dns; s=default; b=QZODdKnaVDAHo27E8UgoJKjOQb AWfEX9RInomLcu126EDjxXwnvnAKso6NMr9hJ/iCb0hRK2f63wQdQP6H9FHKxZvW /254NfvTcWT+/EjXNfvOnb/Kez9GqL1riO8rFvp7LhhrY6+Rfog+DWm5DsGn4P20 nnrYhbrL1CdBY0duI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:from:date:message-id:subject:to :cc:content-type; s=default; bh=y7H/r0O8o5vPXhgTsIMTzYaCcsc=; b= aiWIcsWBgjsV8dPBcGoERiDvNdTU4/Trd1IJglX5to05+eQBSfazbwKpmBmofNBM eyDpBsWDfvPz3f88Oixxf6+yYEUhRIubzywF2nQvy7omieqSyZOF3vIJ310dpP/t fVzeD0Pk8FZpF1oFoMovHYNi9Lbz6SWwSqYlJwkhjBE= 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-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: crossgcc-owner@sourceware.org Delivered-To: mailing list crossgcc@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 12:51:30 -0400 Message-ID: Subject: Re: [PATCH 1/2][RESEND] Prevent zconf.gperf from throwing an error on OSX To: Bryan Hundven Cc: crossgcc 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 register unsigned int len); --- For unsubscribe information see http://sourceware.org/lists.html#faq 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,