Skip to content

Commit

Permalink
tee-supplicant: fix build with kernel < 4.16
Browse files Browse the repository at this point in the history
Commit 3ac968e moved linux/tee.h from
libteec/include to libteec/src resulting in the following build failure
with any kernel < 4.16 (i.e before
torvalds/linux@033ddf1):

/home/buildroot/autobuild/instance-3/output-1/build/optee-client-4.0.0/tee-supplicant/src/tee_supplicant.c: In function 'register_local_shm':
/home/buildroot/autobuild/instance-3/output-1/build/optee-client-4.0.0/tee-supplicant/src/tee_supplicant.c:356:44: error: storage size of 'data' isn't known
  356 |         struct tee_ioctl_shm_register_data data;
      |                                            ^~~~

Fixes:
 - http://autobuild.buildroot.org/results/d63eb7c8574366377760f5ab2eaec02f46173975

Signed-off-by: Fabrice Fontaine <[email protected]>
  • Loading branch information
ffontaine committed Jan 5, 2024
1 parent 98dc4f4 commit 1a85bf7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion tee-supplicant/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@ endif()
################################################################################
# Public and private header and library dependencies
################################################################################
target_include_directories(${PROJECT_NAME} PRIVATE src)
target_include_directories(${PROJECT_NAME}
PRIVATE src
PRIVATE ../libteec/src
)

target_link_libraries(${PROJECT_NAME}
PRIVATE teec
Expand Down
2 changes: 1 addition & 1 deletion tee-supplicant/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ TEES_OBJ_DIR := $(OUT_DIR)
TEES_OBJS := $(patsubst %.c,$(TEES_OBJ_DIR)/%.o, $(TEES_SRCS))
TEES_INCLUDES := ${CURDIR}/../libteec/include \
${CURDIR}/src \
${CURDIR}/../libteec/include \
${CURDIR}/../libteec/src \

TEES_CFLAGS := $(addprefix -I, $(TEES_INCLUDES)) $(CFLAGS) \
-DDEBUGLEVEL_$(CFG_TEE_SUPP_LOG_LEVEL) \
Expand Down

0 comments on commit 1a85bf7

Please sign in to comment.