diff mbox

[15/16] u-boot-tools: compilation on darwin

Message ID 1350833876-9499-15-git-send-email-diorcet.yann@gmail.com
State Accepted
Headers show

Commit Message

Yann Diorcet Oct. 21, 2012, 3:37 p.m. UTC
From: Yann Diorcet <yann.diorcet@belledonne-communications.com>

---
 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

Comments

Esben Haabendal Dec. 14, 2012, 7:27 p.m. UTC | #1
Yann Diorcet <diorcet.yann@gmail.com> writes:

> From: Yann Diorcet <yann.diorcet@belledonne-communications.com>
>
> ---
>  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 <stdint.h>
> + # include <linux/mtd/mtd.h>
> ++#elif __APPLE__
> ++# include <stdint.h>
> ++#define ulong unsigned long
> ++#include <linux/mtd/mtd-abi.h>
> ++typedef long long               loff_t;
> + #else
> + # define  __user	/* nothing */
> + # include <mtd/mtd-user.h>
> +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"

Merged to master, thanks.

/Esben
diff mbox

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 <stdint.h>
+ # include <linux/mtd/mtd.h>
++#elif __APPLE__
++# include <stdint.h>
++#define ulong unsigned long
++#include <linux/mtd/mtd-abi.h>
++typedef long long               loff_t;
+ #else
+ # define  __user	/* nothing */
+ # include <mtd/mtd-user.h>
+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"