From patchwork Thu Nov 24 21:36:16 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_Bie=C3=9Fmann?= X-Patchwork-Id: 127609 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id EF7361007D7 for ; Fri, 25 Nov 2011 08:36:48 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D939428121; Thu, 24 Nov 2011 22:36:46 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kTWMGGQwjdhZ; Thu, 24 Nov 2011 22:36:46 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 71B6A280E1; Thu, 24 Nov 2011 22:36:44 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 21307280E1 for ; Thu, 24 Nov 2011 22:36:43 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AbQWYDS0Q5Ri for ; Thu, 24 Nov 2011 22:36:42 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-bw0-f44.google.com (mail-bw0-f44.google.com [209.85.214.44]) by theia.denx.de (Postfix) with ESMTPS id 64DF9280CE for ; Thu, 24 Nov 2011 22:36:40 +0100 (CET) Received: by bkbzv15 with SMTP id zv15so3121311bkb.3 for ; Thu, 24 Nov 2011 13:36:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:mime-version :content-type:content-transfer-encoding; bh=191hAjlFMlDmn0y9z0PnjsN/hKtAwRJBmVjFq68TWWw=; b=Dn+k94O7kOooGdb5jgDwi7mf70yUIFCS/Dg+Jr+bgFEYeV7Gsz/9+8kVpZEaP2e8/B r3tVxe66QmPz42QYqE8sGjnH4fxSkfbqXUgCDTLz+ckBKUIJ4s2IxOhO4FMnji1nooAm dPZv+6av8n+RtZIW/iNflNZPNm1RV+1fNnFoE= Received: by 10.204.141.2 with SMTP id k2mr27987764bku.81.1322170600555; Thu, 24 Nov 2011 13:36:40 -0800 (PST) Received: from localhost.localdomain (dslb-188-110-194-165.pools.arcor-ip.net. [188.110.194.165]) by mx.google.com with ESMTPS id q16sm26503147fae.6.2011.11.24.13.36.39 (version=SSLv3 cipher=OTHER); Thu, 24 Nov 2011 13:36:39 -0800 (PST) From: =?UTF-8?q?Andreas=20Bie=C3=9Fmann?= To: U-Boot Mailinglist Date: Thu, 24 Nov 2011 22:36:16 +0100 Message-Id: <1322170576-50858-1-git-send-email-andreas.devel@googlemail.com> X-Mailer: git-send-email 1.7.7.4 MIME-Version: 1.0 Subject: [U-Boot] [PATCH] tools/os_support: add OS X Lion support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de OS X Lion's c-library implements getline(), therefore prevent including the old helper implementation for __DARWIN_C_LEVEL < 200809L. Without this patch following error occours: ---8<--- In file included from os_support.h:32, from img2srec.c:55: getline.h:1: error: conflicting types for ‘getline’ /usr/include/stdio.h:449: error: previous declaration of ‘getline’ was here --->8--- Signed-off-by: Andreas Bießmann Acked-by: Marek Vasut --- total: 0 errors, 0 warnings, 15 lines checked NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE 0001-tools-os_support-add-OS-X-Lion-support.patch has no obvious style problems and is ready for submission. tools/os_support.c | 2 +- tools/os_support.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/os_support.c b/tools/os_support.c index 1ed89e6..319c0fe 100644 --- a/tools/os_support.c +++ b/tools/os_support.c @@ -23,6 +23,6 @@ #ifdef __MINGW32__ #include "mingw_support.c" #endif -#ifdef __APPLE__ +#if defined(__APPLE__) && __DARWIN_C_LEVEL < 200809L #include "getline.c" #endif diff --git a/tools/os_support.h b/tools/os_support.h index 7dcbee4..5bf7add 100644 --- a/tools/os_support.h +++ b/tools/os_support.h @@ -28,7 +28,7 @@ #include "mingw_support.h" #endif -#ifdef __APPLE__ +#if defined(__APPLE__) && __DARWIN_C_LEVEL < 200809L #include "getline.h" #endif