include system sys/types header for all struct checks

fixes sockaddr_dl::sdl_index member check on FreeBSD

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2021-07-03 10:52:49 +03:00
parent fb084d665c
commit b8ed1c21e2

View file

@ -54,7 +54,7 @@ endmacro()
# a function to check for C struct member presence in header, if member is # a function to check for C struct member presence in header, if member is
# found a definition is added # found a definition is added
function(KATIE_CHECK_STRUCT FORSTRUCT FORMEMBER FROMHEADER) function(KATIE_CHECK_STRUCT FORSTRUCT FORMEMBER FROMHEADER)
check_struct_has_member("struct ${FORSTRUCT}" "${FORMEMBER}" "${FROMHEADER}" HAVE_${FORSTRUCT}_${FORMEMBER}) check_struct_has_member("struct ${FORSTRUCT}" "${FORMEMBER}" "sys/types.h;${FROMHEADER}" HAVE_${FORSTRUCT}_${FORMEMBER})
if(HAVE_${FORSTRUCT}_${FORMEMBER}) if(HAVE_${FORSTRUCT}_${FORMEMBER})
string(TOUPPER "${FORSTRUCT}_${FORMEMBER}" upperstructmember) string(TOUPPER "${FORSTRUCT}_${FORMEMBER}" upperstructmember)