Skip to contentSkip to conversation

oprofile: Fix build on musl

PATCH New Khem Raj 1 participant 1 message Mar 13, 2021

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 oprofile: Fix build on musl

MAX_INPUT is defined in linux/limits.h, therefore include it

---
 meta-oe/recipes-kernel/oprofile/oprofile.inc    |  1 +
 .../oprofile/oprofile/include_limits.patch      | 17 +++++++++++++++++
 2 files changed, 18 insertions(+)
 create mode 100644 meta-oe/recipes-kernel/oprofile/oprofile/include_limits.patch
meta-oe/recipes-kernel/oprofile/oprofile.inc +1 -0
index 0e1e2ed8c9..0863a8fd36 100644
@@ -26,6 +26,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \
            file://0001-Add-rmb-definition-for-NIOS2-architecture.patch \
            file://0001-replace-sym_iterator-0-with-sym_iterator.patch \
            file://0001-Use-new-bfd-APIs-from-2.34.patch \
+           file://include_limits.patch \
 "
 UPSTREAM_CHECK_REGEX = "oprofile-(?P<pver>\d+(\.\d+)+)/"
 UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/oprofile/files/oprofile/"
meta-oe/recipes-kernel/oprofile/oprofile/include_limits.patch new file +17 -0
new file mode 100644
index 0000000000..5aabfe78eb
@@ -0,0 +1,17 @@
+include linux/limits.h for MAX_INPUT
+
+Fixes
+op_pe_utils.cpp:533:19: error: 'MAX_INPUT' was not declared in this scope
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+--- a/libpe_utils/op_pe_utils.cpp
++++ b/libpe_utils/op_pe_utils.cpp
+@@ -11,6 +11,7 @@
+  *
+  */
+ 
++#include <linux/limits.h>
+ #include <linux/perf_event.h>
+ #include <dirent.h>
+ #include <stdio.h>
Signature · 1 line
2.30.2