diff options
| author | Ming Liu <peter.x.liu@external.atlascopco.com> | 2016-09-26 18:21:32 +0200 |
|---|---|---|
| committer | Joe MacDonald <joe_macdonald@mentor.com> | 2016-10-20 11:17:23 -0400 |
| commit | 8760099c3da9dd6f7b66fd5bd4ffe2a0eab41986 (patch) | |
| tree | e49e905e0654b0088e46b5ae757e15070f34dc1f | |
| parent | af864a7000525781794f989366dc13da6e51fed8 (diff) | |
| download | meta-openembedded-8760099c3da9dd6f7b66fd5bd4ffe2a0eab41986.tar.gz | |
atftp: fixes musl libc build
The patches derive from buildroot:
https://git.busybox.net/buildroot/commit/?id=ef33c008e3c5048d1442f8b0f6336db2fa8d79a1
Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
3 files changed, 92 insertions, 0 deletions
diff --git a/meta-networking/recipes-daemons/atftp/atftp/0001-argz.h-fix-musl-compile-add-missing-defines.patch b/meta-networking/recipes-daemons/atftp/atftp/0001-argz.h-fix-musl-compile-add-missing-defines.patch new file mode 100644 index 0000000000..cfa8a7325f --- /dev/null +++ b/meta-networking/recipes-daemons/atftp/atftp/0001-argz.h-fix-musl-compile-add-missing-defines.patch | |||
| @@ -0,0 +1,45 @@ | |||
| 1 | From 543e67919f5cacf309ac88ab091331e41af4224b Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Peter Seiderer <ps.report@gmx.net> | ||
| 3 | Date: Thu, 16 Apr 2015 22:41:57 +0200 | ||
| 4 | Subject: [PATCH] argz.h: fix musl compile (add missing defines) | ||
| 5 | |||
| 6 | Upstream-Status: Pending | ||
| 7 | |||
| 8 | Add __THROW, __BEGIN_DECLS, __END_DECLS and __attribute_pure__ defines. | ||
| 9 | |||
| 10 | Signed-off-by: Peter Seiderer <ps.report@gmx.net> | ||
| 11 | Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com> | ||
| 12 | --- | ||
| 13 | argz.h | 16 ++++++++++++++++ | ||
| 14 | 1 file changed, 16 insertions(+) | ||
| 15 | |||
| 16 | diff --git a/argz.h b/argz.h | ||
| 17 | index 582be55..bdf9f62 100644 | ||
| 18 | --- a/argz.h | ||
| 19 | +++ b/argz.h | ||
| 20 | @@ -48,6 +48,22 @@ | ||
| 21 | # define __const const | ||
| 22 | #endif | ||
| 23 | |||
| 24 | +#ifndef __THROW | ||
| 25 | +# define __THROW | ||
| 26 | +#endif | ||
| 27 | + | ||
| 28 | +#ifndef __BEGIN_DECLS | ||
| 29 | +# define __BEGIN_DECLS | ||
| 30 | +#endif | ||
| 31 | + | ||
| 32 | +#ifndef __END_DECLS | ||
| 33 | +# define __END_DECLS | ||
| 34 | +#endif | ||
| 35 | + | ||
| 36 | +#ifndef __attribute_pure__ | ||
| 37 | +# define __attribute_pure__ | ||
| 38 | +#endif | ||
| 39 | + | ||
| 40 | #ifndef __error_t_defined | ||
| 41 | typedef int error_t; | ||
| 42 | #endif | ||
| 43 | -- | ||
| 44 | 2.1.4 | ||
| 45 | |||
diff --git a/meta-networking/recipes-daemons/atftp/atftp/0002-tftp.h-tftpd.h-fix-musl-compile-missing-include.patch b/meta-networking/recipes-daemons/atftp/atftp/0002-tftp.h-tftpd.h-fix-musl-compile-missing-include.patch new file mode 100644 index 0000000000..093054ce80 --- /dev/null +++ b/meta-networking/recipes-daemons/atftp/atftp/0002-tftp.h-tftpd.h-fix-musl-compile-missing-include.patch | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | From 77e399899d9d7297d23c321811b628febdf0fd92 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Peter Seiderer <ps.report@gmx.net> | ||
| 3 | Date: Thu, 16 Apr 2015 22:43:49 +0200 | ||
| 4 | Subject: [PATCH] tftp.h/tftpd.h: fix musl compile (missing include) | ||
| 5 | |||
| 6 | Upstream-Status: Pending | ||
| 7 | |||
| 8 | Add sys/types.h include for u_char typedef. | ||
| 9 | |||
| 10 | Signed-off-by: Peter Seiderer <ps.report@gmx.net> | ||
| 11 | Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com> | ||
| 12 | --- | ||
| 13 | tftp.h | 1 + | ||
| 14 | tftpd.h | 1 + | ||
| 15 | 2 files changed, 2 insertions(+) | ||
| 16 | |||
| 17 | diff --git a/tftp.h b/tftp.h | ||
| 18 | index 12bd6aa..32a3f63 100644 | ||
| 19 | --- a/tftp.h | ||
| 20 | +++ b/tftp.h | ||
| 21 | @@ -19,6 +19,7 @@ | ||
| 22 | |||
| 23 | #include <sys/time.h> | ||
| 24 | #include <sys/times.h> | ||
| 25 | +#include <sys/types.h> | ||
| 26 | #include "tftp_def.h" | ||
| 27 | #include "config.h" | ||
| 28 | |||
| 29 | diff --git a/tftpd.h b/tftpd.h | ||
| 30 | index 945065e..60d3a49 100644 | ||
| 31 | --- a/tftpd.h | ||
| 32 | +++ b/tftpd.h | ||
| 33 | @@ -20,6 +20,7 @@ | ||
| 34 | #include <pthread.h> | ||
| 35 | #include <arpa/tftp.h> | ||
| 36 | #include <arpa/inet.h> | ||
| 37 | +#include <sys/types.h> | ||
| 38 | #include "tftp_io.h" | ||
| 39 | |||
| 40 | /* | ||
| 41 | -- | ||
| 42 | 2.1.4 | ||
| 43 | |||
diff --git a/meta-networking/recipes-daemons/atftp/atftp_git.bb b/meta-networking/recipes-daemons/atftp/atftp_git.bb index b222c34bb9..a9949d59ae 100644 --- a/meta-networking/recipes-daemons/atftp/atftp_git.bb +++ b/meta-networking/recipes-daemons/atftp/atftp_git.bb | |||
| @@ -15,6 +15,10 @@ SRC_URI = "git://git.code.sf.net/p/atftp/code \ | |||
| 15 | file://atftpd.service \ | 15 | file://atftpd.service \ |
| 16 | file://atftp-0.7-sorcerers_apprentice.patch \ | 16 | file://atftp-0.7-sorcerers_apprentice.patch \ |
| 17 | " | 17 | " |
| 18 | SRC_URI_append_libc-musl = " file://0001-argz.h-fix-musl-compile-add-missing-defines.patch \ | ||
| 19 | file://0002-tftp.h-tftpd.h-fix-musl-compile-missing-include.patch \ | ||
| 20 | " | ||
| 21 | |||
| 18 | S = "${WORKDIR}/git" | 22 | S = "${WORKDIR}/git" |
| 19 | 23 | ||
| 20 | inherit autotools update-rc.d systemd | 24 | inherit autotools update-rc.d systemd |
