All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/atop: fix musl build
@ 2023-10-29 18:05 Fabrice Fontaine
  2023-11-08 22:10 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2023-10-29 18:05 UTC (permalink / raw)
  To: buildroot; +Cc: Fabrice Fontaine, Ricardo Martincoski

Fix the following build failure with musl raised since bump to version
2.9.0 in commit 8c70374c4f0f9f77875eac26a5e51ab662575c1c:

atop.h:157:1: error: unknown type name 'time_t'
  157 | time_t          normalize_epoch(time_t, long);
      | ^~~~~~
atop.h:157:1: note: 'time_t' is defined in header '<time.h>'; did you forget to '#include <time.h>'?
atop.h:157:40: error: expected ')' before 'long'
  157 | time_t          normalize_epoch(time_t, long);
      |                                        ^~~~~
      |                                        )

Fixes:
 - http://autobuild.buildroot.org/results/e7ec8d16f2299320f374a0198c8e9b18a102b037

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/atop/0001-atop.h-include-time.h.patch | 41 +++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 package/atop/0001-atop.h-include-time.h.patch

diff --git a/package/atop/0001-atop.h-include-time.h.patch b/package/atop/0001-atop.h-include-time.h.patch
new file mode 100644
index 0000000000..2b8a390e71
--- /dev/null
+++ b/package/atop/0001-atop.h-include-time.h.patch
@@ -0,0 +1,41 @@
+From 03c5c4dd29bc7590baccb55a36d61e7f4b39c1fe Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Sun, 29 Oct 2023 18:56:35 +0100
+Subject: [PATCH] atop.h: include time.h
+
+Include time.h to avoid the following build failure with musl:
+
+atop.h:157:1: error: unknown type name 'time_t'
+  157 | time_t          normalize_epoch(time_t, long);
+      | ^~~~~~
+atop.h:157:1: note: 'time_t' is defined in header '<time.h>'; did you forget to '#include <time.h>'?
+atop.h:157:40: error: expected ')' before 'long'
+  157 | time_t          normalize_epoch(time_t, long);
+      |                                        ^~~~~
+      |                                        )
+
+Fixes:
+ - http://autobuild.buildroot.org/results/e7ec8d16f2299320f374a0198c8e9b18a102b037
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Upstream: https://github.com/Atoptool/atop/pull/280
+---
+ atop.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/atop.h b/atop.h
+index 9274fc5..3d5fea4 100644
+--- a/atop.h
++++ b/atop.h
+@@ -24,6 +24,8 @@
+ #ifndef __ATOP__
+ #define __ATOP__
+ 
++#include <time.h>
++
+ #define	EQ		0
+ #define SECONDSINDAY	86400
+ #define RAWNAMESZ	256
+-- 
+2.42.0
+
-- 
2.42.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-11-08 22:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-29 18:05 [Buildroot] [PATCH 1/1] package/atop: fix musl build Fabrice Fontaine
2023-11-08 22:10 ` Thomas Petazzoni via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.