]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
selftests/resctrl: Move _GNU_SOURCE define into Makefile
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 2 Oct 2023 09:48:10 +0000 (12:48 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Nov 2023 17:15:07 +0000 (17:15 +0000)
commit49ff765672bb7e961055b8baa75a8a4cf5833875
tree6e4d341aaeabe8841981b8bdf347a495e34ad991
parenta91a4e52bfe7bd2b5a05decd244a345ed77d9585
selftests/resctrl: Move _GNU_SOURCE define into Makefile

commit 3a1e4a91aa454a1c589a9824d54179fdbfccde45 upstream.

_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@linux.intel.com>
Tested-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Reviewed-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/resctrl/Makefile
tools/testing/selftests/resctrl/resctrl.h