Skip to content

Commit 2c3b8f8

Browse files
edliawshuahkh
authored andcommitted
selftests/sgx: Include KHDR_INCLUDES in Makefile
Add KHDR_INCLUDES to the CFLAGS to pull in the kselftest harness dependencies (-D_GNU_SOURCE). Also, remove redefinitions of _GNU_SOURCE in the source code. Fixes: 8092162 ("selftests/harness: remove use of LINE_MAX") Reported-by: kernel test robot <oliver.sang@intel.com> Closes: https://lore.kernel.org/oe-lkp/202404301040.3bea5782-oliver.sang@intel.com Signed-off-by: Edward Liaw <edliaw@google.com> Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com> Acked-by: Dave Hansen <dave.hansen@linux.intel.com> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Tested-by: Jarkko Sakkinen <jarkko@kernel.org> Reviewed-by: John Hubbard <jhubbard@nvidia.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
1 parent daef47b commit 2c3b8f8

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

tools/testing/selftests/sgx/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ OBJCOPY := $(CROSS_COMPILE)objcopy
1212
endif
1313

1414
INCLUDES := -I$(top_srcdir)/tools/include
15-
HOST_CFLAGS := -Wall -Werror -g $(INCLUDES) -fPIC
15+
HOST_CFLAGS := -Wall -Werror $(KHDR_INCLUDES) -g $(INCLUDES) -fPIC
1616
HOST_LDFLAGS := -z noexecstack -lcrypto
1717
ENCL_CFLAGS += -Wall -Werror -static-pie -nostdlib -ffreestanding -fPIE \
1818
-fno-stack-protector -mrdrnd $(INCLUDES)

tools/testing/selftests/sgx/sigstruct.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// SPDX-License-Identifier: GPL-2.0
22
/* Copyright(c) 2016-20 Intel Corporation. */
33

4-
#define _GNU_SOURCE
54
#include <assert.h>
65
#include <getopt.h>
76
#include <stdbool.h>

0 commit comments

Comments
 (0)