package/swupdate: fix musl build
PATCH 1/1 package/swupdate: fix musl build
Fix the following musl build failure raised since bump to version 2023.05 in commit b86542085df87da91057017b17f261a213bfd918 and
https://github.com/sbabic/swupdate/commit/8228b1390632195158f4387d7aae659ebd6f1469:
In file included from core/bootloader.c:9:include/util.h:210:23: error: unknown type name 'mode_t'
210 | int mkpath(char *dir, mode_t mode);
| ^~~~~~
Fixes:
- http://autobuild.buildroot.org/results/e545f294c7f032fd7434fdb91aa18a38b2e19038
--- ...001-include-util-h-fix-build-on-musl.patch | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 package/swupdate/0001-include-util-h-fix-build-on-musl.patch
package/swupdate/0001-include-util-h-fix-build-on-musl.patch new file +41 -0
@@ -0,0 +1,41 @@ +From 1999685830d6e9b57014666b9e53e46de17a471c Mon Sep 17 00:00:00 2001 +From: Dominique Martinet <[email protected]> +Date: Fri, 15 Sep 2023 18:14:57 +0900 +Subject: [PATCH] include/util.h: fix build on musl + +Building on musl 1.2.4 fails with the following error/warnings: + +include/util.h:211:23: error: unknown type name 'mode_t' + 211 | int mkpath(char *dir, mode_t mode); +include/util.h:269:36: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration + 269 | char *swupdate_time_iso8601(struct timeval *tv); + +These were caused by a recent reorganization of the headers and glibc +appears more tolerant here. + +Fixes: 8228b1390632 ("Reorganize includes to have smaller files") +Signed-off-by: Dominique Martinet <[email protected]> +Upstream: https://github.com/sbabic/swupdate/commit/1999685830d6e9b57014666b9e53e46de17a471c +Signed-off-by: Fabrice Fontaine <[email protected]> +--- + include/util.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/include/util.h b/include/util.h +index 2f5c7adc..5f4cdc01 100644 +--- a/include/util.h ++++ b/include/util.h +@@ -8,11 +8,13 @@ + #ifndef _UTIL_H + #define _UTIL_H + ++#include <fcntl.h> + #include <stdint.h> + #include <stdlib.h> + #include <string.h> + #include <stdio.h> + #include <stdbool.h> ++#include <sys/time.h> + #if defined(__linux__) + #include <linux/types.h> + #endif
Signature · 6 lines
2.40.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 9 lines · Fabrice Fontaine
Fix the following musl build failure raised since bump to version 2023.05 in commit
b86542085df87da91057017b17f261a213bfd918and
https://github.com/sbabic/swupdate/commit/8228b1390632195158f4387d7aae659ebd6f1469:In file included from
core/bootloader.c:9:include/util.h:210:23: error: unknown type name 'mode_t'
210 | intmkpath(char *dir, mode_t mode);
| ^~~~~~
Quoted 4 lines
Fixes:
- http://autobuild.buildroot.org/results/e545f294c7f032fd7434fdb91aa18a38b2e19038Signed-off-by Fabrice Fontaine <[email protected]>
Applied to master, thanks.
Regards,
Arnout
Quoted 42 lines
--- ...001-include-util-h-fix-build-on-musl.patch | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+)create mode 100644
package/swupdate/0001-include-util-h-fix-build-on-musl.patchpackage/swupdate/0001-include-util-h-fix-build-on-musl.patch new file +31
-0@@ -0,0 +1,41 @@ +From 1999685830d6e9b57014666b9e53e46de17a471c Mon Sep 17 00:00:00 2001 +From: Dominique Martinet <[email protected]> +Date: Fri, 15 Sep 2023 18:14:57 +0900 +Subject: [PATCH] include/util.h: fix build on musl + +Building on musl 1.2.4 fails with the following error/warnings: + +include/util.h:211:23: error: unknown type name 'mode_t' + 211 | int mkpath(char *dir, mode_t mode); +include/util.h:269:36: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration + 269 | char *swupdate_time_iso8601(struct timeval *tv); + +These were caused by a recent reorganization of the headers and glibc +appears more tolerant here. + +Fixes: 8228b1390632 ("Reorganize includes to have smaller files") +Signed-off-by: Dominique Martinet <[email protected]> +Upstream: https://github.com/sbabic/swupdate/commit/1999685830d6e9b57014666b9e53e46de17a471c +Signed-off-by: Fabrice Fontaine <[email protected]> +--- + include/util.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/include/util.h b/include/util.h +index 2f5c7adc..5f4cdc01 100644 +--- a/include/util.h ++++ b/include/util.h +@@ -8,11 +8,13 @@ + #ifndef _UTIL_H + #define _UTIL_H +
package/swupdate/0001-include-util-h-fix-build-on-musl.patch line 41
Quoted 10 lines
package/swupdate/0001-include-util-h-fix-build-on-musl.patch new file +10
-0++#include <fcntl.h> + #include <stdint.h> + #include <stdlib.h> + #include <string.h> + #include <stdio.h> + #include <stdbool.h> ++#include <sys/time.h> + #if defined(__linux__) + #include <linux/types.h> + #endif
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot