atftp: fixes musl libc build
PATCH 1/1 atftp: fixes musl libc build
From: Ming Liu <[email protected]>
The patches derive from buildroot:
https://git.busybox.net/buildroot/commit/?id=ef33c008e3c5048d1442f8b0f6336db2fa8d79a1
--- ...gz.h-fix-musl-compile-add-missing-defines.patch | 45 ++++++++++++++++++++++ ...-tftpd.h-fix-musl-compile-missing-include.patch | 43 +++++++++++++++++++++ meta-networking/recipes-daemons/atftp/atftp_git.bb | 4 ++ 3 files changed, 92 insertions(+) create mode 100644 meta-networking/recipes-daemons/atftp/atftp/0001-argz.h-fix-musl-compile-add-missing-defines.patch create mode 100644 meta-networking/recipes-daemons/atftp/atftp/0002-tftp.h-tftpd.h-fix-musl-compile-missing-include.patch
meta-networking/recipes-daemons/atftp/atftp/0001-argz.h-fix-musl-compile-add-missing-defines.patch new file +45 -0
@@ -0,0 +1,45 @@ +From 543e67919f5cacf309ac88ab091331e41af4224b Mon Sep 17 00:00:00 2001 +From: Peter Seiderer <[email protected]> +Date: Thu, 16 Apr 2015 22:41:57 +0200 +Subject: [PATCH] argz.h: fix musl compile (add missing defines) + +Upstream-Status: Pending + +Add __THROW, __BEGIN_DECLS, __END_DECLS and __attribute_pure__ defines. + +Signed-off-by: Peter Seiderer <[email protected]> +Signed-off-by: Ming Liu <[email protected]> +--- + argz.h | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +diff --git a/argz.h b/argz.h +index 582be55..bdf9f62 100644 +--- a/argz.h ++++ b/argz.h +@@ -48,6 +48,22 @@ + # define __const const + #endif + ++#ifndef __THROW ++# define __THROW ++#endif ++ ++#ifndef __BEGIN_DECLS ++# define __BEGIN_DECLS ++#endif ++ ++#ifndef __END_DECLS ++# define __END_DECLS ++#endif ++ ++#ifndef __attribute_pure__ ++# define __attribute_pure__ ++#endif ++ + #ifndef __error_t_defined + typedef int error_t; + #endif +-- +2.1.4 +
meta-networking/recipes-daemons/atftp/atftp/0002-tftp.h-tftpd.h-fix-musl-compile-missing-include.patch new file +43 -0
43 lines not on this page · raw message
meta-networking/recipes-daemons/atftp/atftp_git.bb +4 -0
@@ -15,6 +15,10 @@ SRC_URI = "git://git.code.sf.net/p/atftp/code \ file://atftpd.service \ file://atftp-0.7-sorcerers_apprentice.patch \ " +SRC_URI_append_libc-musl = " file://0001-argz.h-fix-musl-compile-add-missing-defines.patch \ + file://0002-tftp.h-tftpd.h-fix-musl-compile-missing-include.patch \ + " + S = "${WORKDIR}/git" inherit autotools update-rc.d systemd
Signature · 1 line
1.9.1
Quoted 44 lines · On Mon, Sep 26, 2016 at 9:21 AM, <[email protected]> wrote:
From: Ming Liu <[email protected]>
The patches derive from buildroot:
https://git.busybox.net/buildroot/commit/?id=ef33c008e3c5048d1442f8b0f6336db2fa8d79a1Signed-off-by Ming Liu <[email protected]>--- ...gz.h-fix-musl-compile-add-missing-defines.patch | 45 ++++++++++++++++++++++ ...-tftpd.h-fix-musl-compile-missing-include.patch | 43 +++++++++++++++++++++ meta-networking/recipes-daemons/atftp/atftp_git.bb | 4 ++ 3 files changed, 92 insertions(+) create mode 100644 meta-networking/recipes-daemons/atftp/atftp/0001-argz.h-fix-musl-compile-add-missing-defines.patch create mode 100644 meta-networking/recipes-daemons/atftp/atftp/0002-tftp.h-tftpd.h-fix-musl-compile-missing-include.patchmeta-networking/recipes-daemons/atftp/atftp/0001-argz.h-fix-musl-compile-add-missing-defines.patch new file +24
-0@@ -0,0 +1,45 @@ +From 543e67919f5cacf309ac88ab091331e41af4224b Mon Sep 17 00:00:00 2001 +From: Peter Seiderer <[email protected]> +Date: Thu, 16 Apr 2015 22:41:57 +0200 +Subject: [PATCH] argz.h: fix musl compile (add missing defines) + +Upstream-Status: Pending + +Add __THROW, __BEGIN_DECLS, __END_DECLS and __attribute_pure__ defines. + +Signed-off-by: Peter Seiderer <[email protected]> +Signed-off-by: Ming Liu <[email protected]> +--- + argz.h | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +diff --git a/argz.h b/argz.h +index 582be55..bdf9f62 100644 +--- a/argz.h ++++ b/argz.h +@@ -48,6 +48,22 @@ + # define __const const + #endif + ++#ifndef __THROW
meta-networking/recipes-daemons/atftp/atftp/0001-argz.h-fix-musl-compile-add-missing-defines.patch line 34
Quoted 10 lines
meta-networking/recipes-daemons/atftp/atftp/0001-argz.h-fix-musl-compile-add-missing-defines.patch new file +10
-0++# define __THROW ++#endif ++ ++#ifndef __BEGIN_DECLS ++# define __BEGIN_DECLS ++#endif ++ ++#ifndef __END_DECLS ++# define __END_DECLS ++#endif
These probably are not needed, you can just use
#ifdef __cplusplus
extern "C" {
#endif
and
#ifdef __cplusplus
}
#endif
read through. http://wiki.musl-libc.org/wiki/FAQ
for more details.
Quoted 65 lines
meta-networking/recipes-daemons/atftp/atftp/0001-argz.h-fix-musl-compile-add-missing-defines.patch new file +11
-0++ ++#ifndef __attribute_pure__ ++# define __attribute_pure__ ++#endif ++ + #ifndef __error_t_defined + typedef int error_t; + #endif +-- +2.1.4 +meta-networking/recipes-daemons/atftp/atftp/0002-tftp.h-tftpd.h-fix-musl-compile-missing-include.patch new file +43
-0@@ -0,0 +1,43 @@ +From 77e399899d9d7297d23c321811b628febdf0fd92 Mon Sep 17 00:00:00 2001 +From: Peter Seiderer <[email protected]> +Date: Thu, 16 Apr 2015 22:43:49 +0200 +Subject: [PATCH] tftp.h/tftpd.h: fix musl compile (missing include) + +Upstream-Status: Pending + +Add sys/types.h include for u_char typedef. + +Signed-off-by: Peter Seiderer <[email protected]> +Signed-off-by: Ming Liu <[email protected]> +--- + tftp.h | 1 + + tftpd.h | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/tftp.h b/tftp.h +index 12bd6aa..32a3f63 100644 +--- a/tftp.h ++++ b/tftp.h +@@ -19,6 +19,7 @@ + + #include <sys/time.h> + #include <sys/times.h> ++#include <sys/types.h> + #include "tftp_def.h" + #include "config.h" + +diff --git a/tftpd.h b/tftpd.h +index 945065e..60d3a49 100644 +--- a/tftpd.h ++++ b/tftpd.h +@@ -20,6 +20,7 @@ + #include <pthread.h> + #include <arpa/tftp.h> + #include <arpa/inet.h> ++#include <sys/types.h> + #include "tftp_io.h" + + /* +-- +2.1.4 +meta-networking/recipes-daemons/atftp/atftp_git.bb +0
-0
meta-networking/recipes-daemons/atftp/atftp_git.bb SRC_URI = "git://git.code.sf.net/p/atftp/code \ · line 21
Quoted 7 lines
meta-networking/recipes-daemons/atftp/atftp_git.bb +4
-0@@ -15,6 +15,10 @@ SRC_URI = "git://git.code.sf.net/p/atftp/code \ file://atftpd.service \ file://atftp-0.7-sorcerers_apprentice.patch \ " +SRC_URI_append_libc-musl = " file://0001-argz.h-fix-musl-compile-add-missing-defines.patch \ + file://0002-tftp.h-tftpd.h-fix-musl-compile-missing-include.patch \ + " +
Dont make them musl specific, they should be fine for glibc, if not then fix them such that they are
Quoted 6 lines
meta-networking/recipes-daemons/atftp/atftp_git.bb +0
-1S = "${WORKDIR}/git" inherit autotools update-rc.d systemd --1.9.1