summaryrefslogtreecommitdiff
path: root/meta/recipes-kernel
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2015-09-07 07:45:00 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-12 22:47:16 +0100
commit91b8c2900570720d56a123a90e927f49a6a6095f (patch)
tree13e6a7846f0db0bc90bf97c12be731c0804497fc /meta/recipes-kernel
parentf8d3122e9d194aa7fdf5c4c645edfcc7fdcb9ccc (diff)
downloadopenembedded-core-91b8c2900570720d56a123a90e927f49a6a6095f.tar.gz
openembedded-core-91b8c2900570720d56a123a90e927f49a6a6095f.tar.bz2
openembedded-core-91b8c2900570720d56a123a90e927f49a6a6095f.zip
latencytop: Fix build with clang
Clang is stricter with syntax checking and flags the functions return values if they dont match with function signatures, Fixed thusly Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-kernel')
-rw-r--r--meta/recipes-kernel/latencytop/latencytop-0.5/0001-Rectify-the-function-signatures-to-fix-prototype-mis.patch64
-rw-r--r--meta/recipes-kernel/latencytop/latencytop_0.5.bb6
2 files changed, 68 insertions, 2 deletions
diff --git a/meta/recipes-kernel/latencytop/latencytop-0.5/0001-Rectify-the-function-signatures-to-fix-prototype-mis.patch b/meta/recipes-kernel/latencytop/latencytop-0.5/0001-Rectify-the-function-signatures-to-fix-prototype-mis.patch
new file mode 100644
index 0000000000..b248133460
--- /dev/null
+++ b/meta/recipes-kernel/latencytop/latencytop-0.5/0001-Rectify-the-function-signatures-to-fix-prototype-mis.patch
@@ -0,0 +1,64 @@
+From db112739dc4f608a968b8104b382955dc3d96ca3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 7 Sep 2015 07:40:10 +0000
+Subject: [PATCH] Rectify the function signatures to fix prototype mismatches
+
+clang is less forgiving when it comes to coding standards, correct the
+function signatures to reflect the function logic
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ fsync.c | 7 ++++---
+ latencytop.h | 2 +-
+ 2 files changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/fsync.c b/fsync.c
+index 82dff0e..5cefba9 100644
+--- a/fsync.c
++++ b/fsync.c
+@@ -51,7 +51,7 @@ struct fsync_files {
+ static GList *fsync_data;
+
+
+-static chain_file(struct fsync_process *proc, char *filename)
++static void chain_file(struct fsync_process *proc, char *filename)
+ {
+ struct fsync_files *file;
+ GList *item;
+@@ -75,7 +75,7 @@ static chain_file(struct fsync_process *proc, char *filename)
+ proc->files = g_list_append(proc->files, file);
+ }
+
+-static report_file(char *process, char *file)
++static void report_file(char *process, char *file)
+ {
+ struct fsync_process *proc;
+ GList *item;
+@@ -157,9 +157,10 @@ int enable_fsync_tracer(void)
+ write_to_file("/sys/kernel/debug/tracing/current_tracer", "fsync");
+ write_to_file("/sys/kernel/debug/tracing/iter_ctrl", "ftrace_printk");
+ write_to_file("/sys/kernel/debug/tracing/tracing_on", "1");
++ return ret;
+ }
+
+-int disable_fsync_tracer(void)
++void disable_fsync_tracer(void)
+ {
+ write_to_file("/sys/kernel/debug/tracing/tracing_on", "0");
+ }
+diff --git a/latencytop.h b/latencytop.h
+index 5394d73..9d107a8 100644
+--- a/latencytop.h
++++ b/latencytop.h
+@@ -54,5 +54,5 @@ extern char *translate(char *line);
+ extern void init_translations(char *filename);
+ extern int fsync_display(int duration);
+ extern int enable_fsync_tracer(void);
+-extern int disable_fsync_tracer(void);
++extern void disable_fsync_tracer(void);
+ extern void update_list(void);
+--
+2.5.1
+
diff --git a/meta/recipes-kernel/latencytop/latencytop_0.5.bb b/meta/recipes-kernel/latencytop/latencytop_0.5.bb
index cb0a3c5ed1..f31f1bb7ab 100644
--- a/meta/recipes-kernel/latencytop/latencytop_0.5.bb
+++ b/meta/recipes-kernel/latencytop/latencytop_0.5.bb
@@ -10,7 +10,9 @@ PR = "r3"
SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/${BPN}/${BP}.tar.gz/73bb3371c6ee0b0e68e25289027e865c/${BP}.tar.gz \
file://latencytop-makefile.patch \
- file://latencytop-fsync.patch"
+ file://latencytop-fsync.patch \
+ file://0001-Rectify-the-function-signatures-to-fix-prototype-mis.patch \
+"
SRC_URI[md5sum] = "73bb3371c6ee0b0e68e25289027e865c"
SRC_URI[sha256sum] = "9e7f72fbea7bd918e71212a1eabaad8488d2c602205d2e3c95d62cd57e9203ef"
@@ -21,7 +23,7 @@ PACKAGECONFIG[x11] = ",,gtk+"
EXTRA_OEMAKE_X = "${@bb.utils.contains('PACKAGECONFIG', 'x11', 'HAS_GTK_GUI=1', '', d)}"
-CFLAGS += "${LDFLAGS}"
+#CFLAGS += "${LDFLAGS}"
do_install() {
oe_runmake install DESTDIR=${D} ${EXTRA_OEMAKE_X}