I also encountered this problem. It can be solved by manually adding the following definition of this structure (from Raspberry Pi Video Core API) into EGL/eglplatform.h (adding additional definition will not break compilation on non-legacy code that does not use this structure). And you also need to add the definition of DISPMANX_ELEMENT_HANDLE_T before that. i.e.,
typedef uint32_t DISPMANX_ELEMENT_HANDLE_T;
typedef struct {
DISPMANX_ELEMENT_HANDLE_T element;
int width; /* This is necessary because dispmanx elements are not queriable. */
int height;
} EGL_DISPMANX_WINDOW_T;
After doing this, you will still encounter a few compilation errors in pointer casting. You can just forcefully cast all pointers over (or copy my code ). The compilation should proceed then.
The reason why the compilation breaks is because in the open-source community, many developers still come from private companies working on proprietary projects. Some need to show to their boss that they have done something, so they unnecessarily keeps changing definitions, names, removing structures they do not know about due to their ignorance on other platforms/architectures (so they can say "oh, I did code-base clean-up"). In the end, it causes massive compilation breaks/failures. However, the underlying code is still the same, that is why directly casting pointers over surprisingly works out in the end, which should not be the case if substantial development is present. In summary, the No.1 development principle is that code modification should be made as minimal as possible and should exist if and only if necessary.