Patch "perf probe: Add missing libgen.h header needed for using basename()" has been added to the 5.10-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.10-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.10 subdirectory.

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



commit 6d5643a7bf0a6e537809f389caf6e2d102ca64ff
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 97e2a72bd6f5e..42ba3046f25ec 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