Patchwork [09/16] busybox: make compilable on darwin

login
register
mail settings
Submitter Yann Diorcet
Date Oct. 21, 2012, 3:37 p.m.
Message ID <1350833876-9499-9-git-send-email-diorcet.yann@gmail.com>
Download mbox | patch
Permalink /patch/193032/
State Accepted
Delegated to: Esben Haabendal
Headers show

Comments

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

---
 recipes/busybox/busybox-1.19.4/osx.patch |   12 ++++++++++++
 recipes/busybox/busybox.inc              |    2 +-
 recipes/busybox/busybox_1.19.4.oe        |    1 +
 3 files changed, 14 insertions(+), 1 deletion(-)
 create mode 100644 recipes/busybox/busybox-1.19.4/osx.patch
Esben Haabendal - March 2, 2013, 2:46 p.m.
Yann Diorcet <diorcet.yann@gmail.com> writes:

> From: Yann Diorcet <yann.diorcet@belledonne-communications.com>
>
> ---
>  recipes/busybox/busybox-1.19.4/osx.patch |   12 ++++++++++++
>  recipes/busybox/busybox.inc              |    2 +-
>  recipes/busybox/busybox_1.19.4.oe        |    1 +
>  3 files changed, 14 insertions(+), 1 deletion(-)
>  create mode 100644 recipes/busybox/busybox-1.19.4/osx.patch
>
> diff --git a/recipes/busybox/busybox-1.19.4/osx.patch b/recipes/busybox/busybox-1.19.4/osx.patch
> new file mode 100644
> index 0000000..67bc401
> --- /dev/null
> +++ b/recipes/busybox/busybox-1.19.4/osx.patch
> @@ -0,0 +1,12 @@
> +diff -urN busybox-1.19.4/scripts/kconfig/mconf.c busybox-1.19.4-2/scripts/kconfig/mconf.c
> +--- busybox-1.19.4/scripts/kconfig/mconf.c	2012-02-04 20:24:55.000000000 +0100
> ++++ busybox-1.19.4-2/scripts/kconfig/mconf.c	2012-10-04 09:38:35.000000000 +0200
> +@@ -9,6 +9,8 @@
> +  */
> + 
> + #define _XOPEN_SOURCE 700
> ++/* On Darwin, this may be needed to get SIGWINCH: */
> ++#define _DARWIN_C_SOURCE 1
> + 
> + #include <sys/ioctl.h>
> + #include <sys/wait.h>
> diff --git a/recipes/busybox/busybox.inc b/recipes/busybox/busybox.inc
> index f85850d..204e0c1 100644
> --- a/recipes/busybox/busybox.inc
> +++ b/recipes/busybox/busybox.inc
> @@ -47,7 +47,7 @@ export EXTRA_LDFLAGS = "${LDFLAGS}"
>  
>  require busybox-configure.inc
>  
> -EXTRA_OEMAKE += "V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX}"
> +EXTRA_OEMAKE += "ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX}"
>  EXTRA_OEMAKE += "CROSS=${HOST_PREFIX}"
>  
>  do_compile() {
> diff --git a/recipes/busybox/busybox_1.19.4.oe b/recipes/busybox/busybox_1.19.4.oe
> index 02985af..bd17493 100644
> --- a/recipes/busybox/busybox_1.19.4.oe
> +++ b/recipes/busybox/busybox_1.19.4.oe
> @@ -1,3 +1,4 @@
>  require busybox.inc
>  
>  SRC_URI += "file://udhcp-simple-script-route-del-dev-null.patch"
> +SRC_URI:>BUILD_OS_darwin = " file://osx.patch"

Merged to master, thanks.

The patch is now against 1.20.2, but I only checked that it still could
apply. Will you check that it still works?

/Esben

Patch

diff --git a/recipes/busybox/busybox-1.19.4/osx.patch b/recipes/busybox/busybox-1.19.4/osx.patch
new file mode 100644
index 0000000..67bc401
--- /dev/null
+++ b/recipes/busybox/busybox-1.19.4/osx.patch
@@ -0,0 +1,12 @@ 
+diff -urN busybox-1.19.4/scripts/kconfig/mconf.c busybox-1.19.4-2/scripts/kconfig/mconf.c
+--- busybox-1.19.4/scripts/kconfig/mconf.c	2012-02-04 20:24:55.000000000 +0100
++++ busybox-1.19.4-2/scripts/kconfig/mconf.c	2012-10-04 09:38:35.000000000 +0200
+@@ -9,6 +9,8 @@
+  */
+ 
+ #define _XOPEN_SOURCE 700
++/* On Darwin, this may be needed to get SIGWINCH: */
++#define _DARWIN_C_SOURCE 1
+ 
+ #include <sys/ioctl.h>
+ #include <sys/wait.h>
diff --git a/recipes/busybox/busybox.inc b/recipes/busybox/busybox.inc
index f85850d..204e0c1 100644
--- a/recipes/busybox/busybox.inc
+++ b/recipes/busybox/busybox.inc
@@ -47,7 +47,7 @@  export EXTRA_LDFLAGS = "${LDFLAGS}"
 
 require busybox-configure.inc
 
-EXTRA_OEMAKE += "V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX}"
+EXTRA_OEMAKE += "ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX}"
 EXTRA_OEMAKE += "CROSS=${HOST_PREFIX}"
 
 do_compile() {
diff --git a/recipes/busybox/busybox_1.19.4.oe b/recipes/busybox/busybox_1.19.4.oe
index 02985af..bd17493 100644
--- a/recipes/busybox/busybox_1.19.4.oe
+++ b/recipes/busybox/busybox_1.19.4.oe
@@ -1,3 +1,4 @@ 
 require busybox.inc
 
 SRC_URI += "file://udhcp-simple-script-route-del-dev-null.patch"
+SRC_URI:>BUILD_OS_darwin = " file://osx.patch"