STM32F4Discovery simple example doesn't build with VS Code

C:\users\clovett\.platformio\packages\framework-mbed/platform/mbed_rtc_time.h:33:8: error: redefinition of 'struct timeval'
 struct timeval {
        ^~~~~~~
In file included from c:\users\clovett\.platformio\packages\toolchain-gccarmnoneeabi\arm-none-eabi\include\sys\select.h:26:0,
                 from c:\users\clovett\.platformio\packages\toolchain-gccarmnoneeabi\arm-none-eabi\include\sys\types.h:68,
                 from c:\users\clovett\.platformio\packages\toolchain-gccarmnoneeabi\arm-none-eabi\include\stdio.h:61,
                 from C:\users\clovett\PLATFO~1\packages\FRAMEW~2\targets\TAE5D3~1\TA903F~1\device/stm32f4xx_hal_def.h:50,
                 from C:\users\clovett\PLATFO~1\packages\FRAMEW~2\targets\TAE5D3~1\TA903F~1\device/stm32f4xx_hal_rcc.h:45,
                 from C:\users\clovett\PLATFO~1\packages\FRAMEW~2\targets\TAE5D3~1\TA903F~1\device/stm32f4xx_hal_conf.h:258,
                 from C:\users\clovett\PLATFO~1\packages\FRAMEW~2\targets\TAE5D3~1\TA903F~1\device/stm32f4xx_hal.h:46,
                 from C:\users\clovett\PLATFO~1\packages\FRAMEW~2\targets\TAE5D3~1\TA903F~1\TARGET~3\device/stm32f4xx.h:250,
                 from C:\users\clovett\PLATFO~1\packages\FRAMEW~2\targets\TAE5D3~1\TA903F~1\TARGET~3\device/cmsis.h:35,
                 from C:\users\clovett\PLATFO~1\packages\FRAMEW~2\targets\TAE5D3~1\TA903F~1\TARGET~3/objects.h:33,
                 from C:\users\clovett\PLATFO~1\packages\FRAMEW~2\targets\TAE5D3~1\TA903F~1/device.h:38,

And this is with what code?

Where else is the timeval struct defined?