From patchwork Sun Oct 21 15:37:54 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yann Diorcet X-Patchwork-Id: 193038 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hugin.dotsrc.org (hugin.dotsrc.org [130.225.254.102]) by ozlabs.org (Postfix) with ESMTP id 4F69D2C008C for ; Mon, 22 Oct 2012 02:38:23 +1100 (EST) Received: from hugin.dotsrc.org (localhost [127.0.0.1]) by hugin.dotsrc.org (Postfix) with ESMTP id 1E9373FBAE for ; Sun, 21 Oct 2012 17:38:22 +0200 (CEST) X-Original-To: dev@oe-lite.org Delivered-To: dev@oe-lite.org Received: from mail-wg0-f47.google.com (mail-wg0-f47.google.com [74.125.82.47]) by hugin.dotsrc.org (Postfix) with ESMTPS id 4A6B63FC31 for ; Sun, 21 Oct 2012 17:38:19 +0200 (CEST) Received: by mail-wg0-f47.google.com with SMTP id ge7so1153094wgb.16 for ; Sun, 21 Oct 2012 08:38:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=avMDacGpkcfKf67AVCfrpYfcCZdGlAZJBNikKm2aAl0=; b=RgNbOD1dGJ/U24Mm2ionciONw5pedA9U/vMzL1X0LjZGR7DuPBvgzhP8nROF/oQa4x 64qQ8YiSW+tiWsydASX52hmNLqxmJNU7oUfjFghoqcwBirsxSwYkvHecltZ2r0KB5ttK /OtmIWTjPeJB2JgBsa1M6R+7dmaWqCzbTxGDVuonUlXIA5Kzd7YllO40JvElczccHm58 qVT3uqOSw8pXN5gDcMl5P7chw5YlUBGeu2yBk0GOIDhT1sDMJnwjHcRJWY8K29EpbtcG XyMZ41p+buMSytuvsqPcPWH6wXBvSIDVoePOGTdGtojZVs+O1+/dHvSi3fanmungX6br M/vQ== Received: by 10.216.202.218 with SMTP id d68mr4171428weo.153.1350833899169; Sun, 21 Oct 2012 08:38:19 -0700 (PDT) Received: from localhost.localdomain (dom38-1-82-236-154-183.fbx.proxad.net. [82.236.154.183]) by mx.google.com with ESMTPS id gm7sm16535929wib.10.2012.10.21.08.38.18 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 21 Oct 2012 08:38:18 -0700 (PDT) From: Yann Diorcet To: dev@oe-lite.org Subject: [PATCH 15/16] u-boot-tools: compilation on darwin Date: Sun, 21 Oct 2012 17:37:54 +0200 Message-Id: <1350833876-9499-15-git-send-email-diorcet.yann@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1350833876-9499-1-git-send-email-diorcet.yann@gmail.com> References: <1350833876-9499-1-git-send-email-diorcet.yann@gmail.com> Cc: Yann Diorcet X-BeenThere: dev@oe-lite.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: OE-lite development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dev-bounces@oe-lite.org Errors-To: dev-bounces@oe-lite.org From: Yann Diorcet --- recipes/u-boot/u-boot-tools-2011.09/osx.patch | 46 +++++++++++++++++++++++++ recipes/u-boot/u-boot-tools_2011.09.oe | 1 + 2 files changed, 47 insertions(+) create mode 100644 recipes/u-boot/u-boot-tools-2011.09/osx.patch diff --git a/recipes/u-boot/u-boot-tools-2011.09/osx.patch b/recipes/u-boot/u-boot-tools-2011.09/osx.patch new file mode 100644 index 0000000..70389ee --- /dev/null +++ b/recipes/u-boot/u-boot-tools-2011.09/osx.patch @@ -0,0 +1,46 @@ +diff -urN u-boot-2011.09/tools/env/fw_env.c u-boot-2011.09.2/tools/env/fw_env.c +--- u-boot-2011.09/tools/env/fw_env.c 2011-09-29 21:11:15.000000000 +0200 ++++ u-boot-2011.09.2/tools/env/fw_env.c 2012-10-04 15:10:59.000000000 +0200 +@@ -38,6 +38,11 @@ + #ifdef MTD_OLD + # include + # include ++#elif __APPLE__ ++# include ++#define ulong unsigned long ++#include ++typedef long long loff_t; + #else + # define __user /* nothing */ + # include +diff -urN u-boot-2011.09/tools/getline.h u-boot-2011.09.2/tools/getline.h +--- u-boot-2011.09/tools/getline.h 2011-09-29 21:11:15.000000000 +0200 ++++ u-boot-2011.09.2/tools/getline.h 2012-10-04 15:08:24.000000000 +0200 +@@ -1 +1,4 @@ ++#ifdef __APPLE__ ++#undef getline ++#endif + int getline(char **lineptr, size_t *n, FILE *stream); +diff -urN u-boot-2011.09/tools/os_support.c u-boot-2011.09.2/tools/os_support.c +--- u-boot-2011.09/tools/os_support.c 2011-09-29 21:11:15.000000000 +0200 ++++ u-boot-2011.09.2/tools/os_support.c 2012-10-04 15:10:59.000000000 +0200 +@@ -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 -urN u-boot-2011.09/tools/os_support.h u-boot-2011.09.2/tools/os_support.h +--- u-boot-2011.09/tools/os_support.h 2011-09-29 21:11:15.000000000 +0200 ++++ u-boot-2011.09.2/tools/os_support.h 2012-10-04 15:10:59.000000000 +0200 +@@ -28,7 +28,7 @@ + #include "mingw_support.h" + #endif + +-#ifdef __APPLE__ ++#if defined(__APPLE__) && __DARWIN_C_LEVEL < 200809L + #include "getline.h" + #endif + diff --git a/recipes/u-boot/u-boot-tools_2011.09.oe b/recipes/u-boot/u-boot-tools_2011.09.oe index a7b4db4..9c79b9b 100644 --- a/recipes/u-boot/u-boot-tools_2011.09.oe +++ b/recipes/u-boot/u-boot-tools_2011.09.oe @@ -3,5 +3,6 @@ LICENSE = "GPL-2.0 & GPL-2.0+" require ${PN}.inc SRC_URI = "ftp://ftp.denx.de/pub/u-boot/u-boot-${PV}.tar.bz2" +SRC_URI += "file://osx.patch" MAKE_TARGETS =+ "include/timestamp_autogenerated.h"