Error when trying to build lv_drivers


Getting a compile error when trying to build lv_driver v8.2

What MCU/Processor/Board and compiler are you using?

What do you want to achieve?

Trying to get the sim up and running. I am trying to build the lv_driver src files as a lib and then link it to my source files.

What have you tried so far?

Tried using diffferent build flags but still not working

Code to reproduce

If anyone can, please help. This is the error I get

make lvdrv
CC submodules/lv_drivers/win_drv.c
CC submodules/lv_drivers/indev/xkb.c
CC submodules/lv_drivers/indev/AD_touch.c
CC submodules/lv_drivers/indev/libinput.c
CC submodules/lv_drivers/indev/evdev.c
CC submodules/lv_drivers/indev/XPT2046.c
CC submodules/lv_drivers/indev/FT5406EE8.c
CC submodules/lv_drivers/gtkdrv/gtkdrv.c
CC submodules/lv_drivers/display/ST7565.c
CC submodules/lv_drivers/display/UC1610.c
CC submodules/lv_drivers/display/R61581.c
CC submodules/lv_drivers/display/fbdev.c
CC submodules/lv_drivers/display/drm.c
CC submodules/lv_drivers/display/ILI9341.c
CC submodules/lv_drivers/display/GC9A01.c
CC submodules/lv_drivers/display/SSD1963.c
CC submodules/lv_drivers/display/SHARP_MIP.c
CC submodules/lv_drivers/sdl/sdl_gpu.c
CC submodules/lv_drivers/sdl/sdl.c
In file included from /usr/include/SDL2/SDL_stdinc.h:37,
                 from /usr/include/SDL2/SDL_main.h:25,
                 from /usr/include/SDL2/SDL.h:32,
                 from submodules/lv_drivers/sdl/sdl.c:54:
/usr/include/stdio.h:77:19: error: conflicting types for ‘ssize_t’
   77 | typedef __ssize_t ssize_t;
      |                   ^~~~~~~
compilation terminated due to -Wfatal-errors.
make: *** [Makefile:96: build/sim/obj/sdl.o] Error 1

Here is the makefile (if it helps):

lvdrv_LIB_CSRCS += $(wildcard $(lvdrv_LIBROOT)/*.c)
lvdrv_LIB_CSRCS += $(wildcard $(lvdrv_LIBROOT)/indev/*.c)
lvdrv_LIB_CSRCS += $(wildcard $(lvdrv_LIBROOT)/gtkdrv/*.c)
lvdrv_LIB_CSRCS += $(wildcard $(lvdrv_LIBROOT)/display/*.c)
lvdrv_LIB_CSRCS += $(wildcard $(lvdrv_LIBROOT)/sdl/*.c)
lvdrv_LIB_COBJS := $(addprefix $(OBJ_DIR)/,$(notdir $(lvdrv_LIB_CSRCS:.c=.o)))

VPATH += $(lvdrv_LIBROOT):$(lvdrv_LIBROOT)/display:$(lvdrv_LIBROOT)/indev:$(lvdrv_LIBROOT)/gtkdrv:$(lvdrv_LIBROOT)/sdl
ifeq ($(TARGET), sim)
INCLUDES += -I$(LIBSRC)/lv_drivers/display -I$(LIBSRC)/lv_drivers/indev -I$(lvdrv_LIBROOT)/sdl

#$(warning CSRCS: $(lvdrv_LIB_CSRCS))
#$(warning COBJS: $(lvdrv_LIB_COBJS))

lvdrv_LIB := $(LIB_DIR)/llvdrv.a

.PHONY: lvdrv-clean lvdrv

lvdrv: $(lvdrv_LIB)

$(lvdrv_LIB): $(lvdrv_LIB_COBJS)
	$(QUIET) $(LD) $(LDOPTS) -o $@ $(lvdrv_LIB_COBJS)

#$(QUIET) $(AR) $(ARFLAGS) $@ $^

	$(QUIET) $(RM) $(lvdrv_LIB_COBJS) $(lvdrv_LIB)

Thanks guys