* [Buildroot] [PATCH] collectd: fix musl builds (ipc module)
@ 2015-11-23 10:54 Alex Suykov
2015-11-23 10:57 ` Baruch Siach
0 siblings, 1 reply; 3+ messages in thread
From: Alex Suykov @ 2015-11-23 10:54 UTC (permalink / raw)
To: buildroot
src/ipc.c uses shm_info.used_ids which musl only provides when
_GNU_SOURCE is defined.
The issue has been fixed upstream. Adding their patch as a temporary
fix to be removed on the next version bump.
https://github.com/collectd/collectd/issues/1147
https://github.com/collectd/collectd/commit/3e3848349b753d78a0b1d19648fb394866856bda
Fixes
http://autobuild.buildroot.net/results/e981c08f01d2916246a17b1dc112e8b3e8c628e2/
Signed-off-by: Alex Suykov <alex.suykov@gmail.com>
---
package/collectd/0002-ipc-enable-gnu-source.patch | 26 +++++++++++++++++++++++
1 file changed, 26 insertions(+)
create mode 100644 package/collectd/0002-ipc-enable-gnu-source.patch
diff --git a/package/collectd/0002-ipc-enable-gnu-source.patch b/package/collectd/0002-ipc-enable-gnu-source.patch
new file mode 100644
index 0000000..5d8813a
--- /dev/null
+++ b/package/collectd/0002-ipc-enable-gnu-source.patch
@@ -0,0 +1,26 @@
+https://github.com/collectd/collectd/commit/3e3848349b753d78a0b1d19648fb394866856bda
+
+ ipc: enable _GNU_SOURCE to fix build with musl libc
+
+ This fixes compile the compile error:
+
+ > ipc.c:154:49: error: 'struct shm_info' has no member named 'used_ids'
+ > ipc_submit_g("shm", "segments", NULL, shm_info.used_ids);
+ > ^
+
+ Fixes #1147
+
+diff --git a/src/ipc.c b/src/ipc.c
+index 3763f24..b403847 100644
+--- a/src/ipc.c
++++ b/src/ipc.c
+@@ -32,6 +32,9 @@
+ #include "configfile.h"
+
+ #if KERNEL_LINUX
++ /* _GNU_SOURCE is needed for struct shm_info.used_ids on musl libc */
++# define _GNU_SOURCE
++
+ /* X/OPEN tells us to use <sys/{types,ipc,sem}.h> for semctl() */
+ /* X/OPEN tells us to use <sys/{types,ipc,msg}.h> for msgctl() */
+ /* X/OPEN tells us to use <sys/{types,ipc,shm}.h> for shmctl() */
--
2.0.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] collectd: fix musl builds (ipc module)
2015-11-23 10:54 [Buildroot] [PATCH] collectd: fix musl builds (ipc module) Alex Suykov
@ 2015-11-23 10:57 ` Baruch Siach
2015-11-23 11:17 ` Alex Suykov
0 siblings, 1 reply; 3+ messages in thread
From: Baruch Siach @ 2015-11-23 10:57 UTC (permalink / raw)
To: buildroot
Hi Alex,
On Mon, Nov 23, 2015 at 12:54:37PM +0200, Alex Suykov wrote:
[...]
> diff --git a/package/collectd/0002-ipc-enable-gnu-source.patch b/package/collectd/0002-ipc-enable-gnu-source.patch
> new file mode 100644
> index 0000000..5d8813a
> --- /dev/null
> +++ b/package/collectd/0002-ipc-enable-gnu-source.patch
> @@ -0,0 +1,26 @@
> +https://github.com/collectd/collectd/commit/3e3848349b753d78a0b1d19648fb394866856bda
> +
> + ipc: enable _GNU_SOURCE to fix build with musl libc
> +
> + This fixes compile the compile error:
> +
> + > ipc.c:154:49: error: 'struct shm_info' has no member named 'used_ids'
> + > ipc_submit_g("shm", "segments", NULL, shm_info.used_ids);
> + > ^
> +
> + Fixes #1147
Please add you sign-off here.
baruch
> +
> +diff --git a/src/ipc.c b/src/ipc.c
> +index 3763f24..b403847 100644
> +--- a/src/ipc.c
> ++++ b/src/ipc.c
> +@@ -32,6 +32,9 @@
> + #include "configfile.h"
> +
> + #if KERNEL_LINUX
> ++ /* _GNU_SOURCE is needed for struct shm_info.used_ids on musl libc */
> ++# define _GNU_SOURCE
> ++
> + /* X/OPEN tells us to use <sys/{types,ipc,sem}.h> for semctl() */
> + /* X/OPEN tells us to use <sys/{types,ipc,msg}.h> for msgctl() */
> + /* X/OPEN tells us to use <sys/{types,ipc,shm}.h> for shmctl() */
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] collectd: fix musl builds (ipc module)
2015-11-23 10:57 ` Baruch Siach
@ 2015-11-23 11:17 ` Alex Suykov
0 siblings, 0 replies; 3+ messages in thread
From: Alex Suykov @ 2015-11-23 11:17 UTC (permalink / raw)
To: buildroot
Mon, Nov 23, 2015 at 12:57:59PM +0200, Baruch Siach wrote:
> > + Fixes #1147
>
> Please add you sign-off here.
Ah, sorry, got confused because it wasn't my patch, it was something
that I pulled from an external source.
v2 sent.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-11-23 11:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-23 10:54 [Buildroot] [PATCH] collectd: fix musl builds (ipc module) Alex Suykov
2015-11-23 10:57 ` Baruch Siach
2015-11-23 11:17 ` Alex Suykov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox