summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2021-12-16 15:04:45 -0800
committerKhem Raj <raj.khem@gmail.com>2021-12-21 18:49:37 -0800
commitcd263e1386913e2bbcd9f656bb65d71df5bc07fe (patch)
tree08943c3b3868e983d6fddc34f6002656ec450869
parenteab5e822a91ad95cf0e7d2406ba3ab5304748713 (diff)
downloadmeta-openembedded-cd263e1386913e2bbcd9f656bb65d71df5bc07fe.tar.gz
inotify-tools: Fix build on musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-support/inotify-tools/inotify-tools/0001-libinotifytools-Include-limit.h-for-PATH_MAX.patch29
-rw-r--r--meta-oe/recipes-support/inotify-tools/inotify-tools/0002-libinotifytools-Bridge-differences-between-musl-glib.patch40
-rw-r--r--meta-oe/recipes-support/inotify-tools/inotify-tools_3.21.9.6.bb5
3 files changed, 73 insertions, 1 deletions
diff --git a/meta-oe/recipes-support/inotify-tools/inotify-tools/0001-libinotifytools-Include-limit.h-for-PATH_MAX.patch b/meta-oe/recipes-support/inotify-tools/inotify-tools/0001-libinotifytools-Include-limit.h-for-PATH_MAX.patch
new file mode 100644
index 0000000000..f30a62d594
--- /dev/null
+++ b/meta-oe/recipes-support/inotify-tools/inotify-tools/0001-libinotifytools-Include-limit.h-for-PATH_MAX.patch
@@ -0,0 +1,29 @@
1From 1e37cc3aa674c4b052f0655fef59a910fd7325cb Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 16 Dec 2021 14:53:25 -0800
4Subject: [PATCH 1/2] libinotifytools: Include limit.h for PATH_MAX
5
6musl builds fail since the required header which defines PATH_MAX is
7missing, its perhaps included indirectly via glibc based systems
8
9Upstream-Status: Submitted [https://github.com/inotify-tools/inotify-tools/pull/153]
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 libinotifytools/src/inotifytools.c | 1 +
13 1 file changed, 1 insertion(+)
14
15diff --git a/libinotifytools/src/inotifytools.c b/libinotifytools/src/inotifytools.c
16index 8bdfdb6..902eac2 100644
17--- a/libinotifytools/src/inotifytools.c
18+++ b/libinotifytools/src/inotifytools.c
19@@ -17,6 +17,7 @@
20 #include "inotifytools_p.h"
21 #include "stats.h"
22
23+#include <limits.h>
24 #include <string.h>
25 #include <strings.h>
26 #include <stdlib.h>
27--
282.34.1
29
diff --git a/meta-oe/recipes-support/inotify-tools/inotify-tools/0002-libinotifytools-Bridge-differences-between-musl-glib.patch b/meta-oe/recipes-support/inotify-tools/inotify-tools/0002-libinotifytools-Bridge-differences-between-musl-glib.patch
new file mode 100644
index 0000000000..931244830c
--- /dev/null
+++ b/meta-oe/recipes-support/inotify-tools/inotify-tools/0002-libinotifytools-Bridge-differences-between-musl-glib.patch
@@ -0,0 +1,40 @@
1From 6c3ce01a281a9aa661494d24a862219fc9e2b460 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 16 Dec 2021 14:57:55 -0800
4Subject: [PATCH 2/2] libinotifytools: Bridge differences between
5 musl/glibc/kernel fnotify.h
6
7System detects to use sys/fnotify.h and then assumes glibc's definitions
8but musl has definitions of its own. perhaps portable thing would be to
9use linux/fnotify.h interface directly on linux irrespective of libc
10
11See the differences discussion here [1]
12
13[1] https://inbox.vuxu.org/musl/20191112220151.GC27331@x230/T/#ma8700992467200c8792e0fa8508eae656b81aeba
14
15Upstream-Status: Submitted [https://github.com/inotify-tools/inotify-tools/pull/154]
16Signed-off-by: Khem Raj <raj.khem@gmail.com>
17---
18 libinotifytools/src/inotifytools.c | 6 ++++++
19 1 file changed, 6 insertions(+)
20
21diff --git a/libinotifytools/src/inotifytools.c b/libinotifytools/src/inotifytools.c
22index 902eac2..2b96395 100644
23--- a/libinotifytools/src/inotifytools.c
24+++ b/libinotifytools/src/inotifytools.c
25@@ -55,6 +55,12 @@ struct fanotify_event_fid {
26 struct fanotify_event_info_fid info;
27 struct file_handle handle;
28 };
29+
30+#ifndef __GLIBC__
31+#define val __val
32+#define __kernel_fsid_t fsid_t
33+#endif
34+
35 #endif
36
37 /**
38--
392.34.1
40
diff --git a/meta-oe/recipes-support/inotify-tools/inotify-tools_3.21.9.6.bb b/meta-oe/recipes-support/inotify-tools/inotify-tools_3.21.9.6.bb
index e3a4e6350e..89c3a00b71 100644
--- a/meta-oe/recipes-support/inotify-tools/inotify-tools_3.21.9.6.bb
+++ b/meta-oe/recipes-support/inotify-tools/inotify-tools_3.21.9.6.bb
@@ -7,7 +7,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=ac6c26e52aea428ee7f56dc2c56424c6"
7 7
8SRCREV = "8f8fcdffb7e80928bea6c1fccd3527a9f5d8fe77" 8SRCREV = "8f8fcdffb7e80928bea6c1fccd3527a9f5d8fe77"
9 9
10SRC_URI = "git://github.com/${BPN}/${BPN};branch=master;protocol=https" 10SRC_URI = "git://github.com/${BPN}/${BPN};branch=master;protocol=https \
11 file://0001-libinotifytools-Include-limit.h-for-PATH_MAX.patch \
12 file://0002-libinotifytools-Bridge-differences-between-musl-glib.patch \
13 "
11 14
12S = "${WORKDIR}/git" 15S = "${WORKDIR}/git"
13 16