summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/resctrl/resctrl.h
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2023-10-02 12:48:10 +0300
committerShuah Khan <skhan@linuxfoundation.org>2023-10-13 14:54:21 -0600
commit3a1e4a91aa454a1c589a9824d54179fdbfccde45 (patch)
tree206f507f96937f6c4df885ebd466e0e537db49ff /tools/testing/selftests/resctrl/resctrl.h
parent030b48fb2cf045dead8ee2c5ead560930044c029 (diff)
downloadlinux-3a1e4a91aa454a1c589a9824d54179fdbfccde45.tar.gz
linux-3a1e4a91aa454a1c589a9824d54179fdbfccde45.tar.bz2
linux-3a1e4a91aa454a1c589a9824d54179fdbfccde45.zip
selftests/resctrl: Move _GNU_SOURCE define into Makefile
_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>
Diffstat (limited to 'tools/testing/selftests/resctrl/resctrl.h')
-rw-r--r--tools/testing/selftests/resctrl/resctrl.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/tools/testing/selftests/resctrl/resctrl.h b/tools/testing/selftests/resctrl/resctrl.h
index dd07463cdf48..d9b5df95849d 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>