Patch "perf probe: Add missing libgen.h header needed for using basename()" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    perf probe: Add missing libgen.h header needed for using basename()

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     perf-probe-add-missing-libgen.h-header-needed-for-us.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 0269c1e4bbe438579b7eb484f9d66187f902a5e3
Author: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
Date:   Thu Mar 21 11:13:30 2024 -0300

    perf probe: Add missing libgen.h header needed for using basename()
    
    [ Upstream commit 581037151910126a7934e369e4b6ac70eda9a703 ]
    
    This prototype is obtained indirectly, by luck, from some other header
    in probe-event.c in most systems, but recently exploded on alpine:edge:
    
       8    13.39 alpine:edge                   : FAIL gcc version 13.2.1 20240309 (Alpine 13.2.1_git20240309)
        util/probe-event.c: In function 'convert_exec_to_group':
        util/probe-event.c:225:16: error: implicit declaration of function 'basename' [-Werror=implicit-function-declaration]
          225 |         ptr1 = basename(exec_copy);
              |                ^~~~~~~~
        util/probe-event.c:225:14: error: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
          225 |         ptr1 = basename(exec_copy);
              |              ^
        cc1: all warnings being treated as errors
        make[3]: *** [/git/perf-6.8.0/tools/build/Makefile.build:158: util] Error 2
    
    Fix it by adding the libgen.h header where basename() is prototyped.
    
    Fixes: fb7345bbf7fad9bf ("perf probe: Support basic dwarf-based operations on uprobe events")
    Cc: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
    Cc: Adrian Hunter <adrian.hunter@xxxxxxxxx>
    Cc: Ian Rogers <irogers@xxxxxxxxxx>
    Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
    Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
    Link: https://lore.kernel.org/lkml/
    Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index 68844c48f688a..454a7e2325d87 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -11,6 +11,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <errno.h>
+#include <libgen.h>
 #include <stdio.h>
 #include <unistd.h>
 #include <stdlib.h>




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux