Patch "selftests/resctrl: Move _GNU_SOURCE define into Makefile" 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

    selftests/resctrl: Move _GNU_SOURCE define into Makefile

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:
     selftests-resctrl-move-_gnu_source-define-into-makef.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 c190d9ce9f3d2e9e7416fca50698d891811c42a0
Author: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx>
Date:   Mon Oct 2 12:48:10 2023 +0300

    selftests/resctrl: Move _GNU_SOURCE define into Makefile
    
    [ Upstream commit 3a1e4a91aa454a1c589a9824d54179fdbfccde45 ]
    
    _GNU_SOURCE is defined in resctrl.h. Defining _GNU_SOURCE has a large
    impact on what gets defined when including headers either before or
    after it. This can result in compile failures if .c file decides to
    include a standard header file before resctrl.h.
    
    It is safer to define _GNU_SOURCE in Makefile so it is always defined
    regardless of in which order includes are done.
    
    Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx>
    Tested-by: Shaopeng Tan <tan.shaopeng@xxxxxxxxxxxxxx>
    Reviewed-by: Reinette Chatre <reinette.chatre@xxxxxxxxx>
    Reviewed-by: Shaopeng Tan <tan.shaopeng@xxxxxxxxxxxxxx>
    Cc: <stable@xxxxxxxxxxxxxxx>
    Signed-off-by: Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/testing/selftests/resctrl/Makefile b/tools/testing/selftests/resctrl/Makefile
index 5073dbc961258..2deac2031de9e 100644
--- a/tools/testing/selftests/resctrl/Makefile
+++ b/tools/testing/selftests/resctrl/Makefile
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 
-CFLAGS = -g -Wall -O2 -D_FORTIFY_SOURCE=2
+CFLAGS = -g -Wall -O2 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE
 CFLAGS += $(KHDR_INCLUDES)
 
 TEST_GEN_PROGS := resctrl_tests
diff --git a/tools/testing/selftests/resctrl/resctrl.h b/tools/testing/selftests/resctrl/resctrl.h
index dbe5cfb545585..4597bba66ad45 100644
--- a/tools/testing/selftests/resctrl/resctrl.h
+++ b/tools/testing/selftests/resctrl/resctrl.h
@@ -1,5 +1,4 @@
 /* SPDX-License-Identifier: GPL-2.0 */
-#define _GNU_SOURCE
 #ifndef RESCTRL_H
 #define RESCTRL_H
 #include <stdio.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