It was decided that SDL 2.0.18 will be in next release (4.4.0) so you’ll only need to build it yourself for 4.3.0.
About that orientation hint, unfortunately that way is now broken (I have been thinking if there is some way to fix that) but there is another way to set content orientation which I have used in one SDL based game
#include <SDL2/SDL_syswm.h>
SDL_SysWMinfo info;
SDL_VERSION(&info.version)
SDL_GetWindowWMInfo(sdl_window, &info);
wl_surface *sdl_wl_surface = info.info.wl.surface;
wl_surface_set_buffer_transform(sdl_wl_surface, WL_OUTPUT_TRANSFORM_270);
where the parameter WL_OUTPUT_TRANSFORM_270 is one of the values shown here wayland-client-protocol.h source code [include/wayland-client-protocol.h] - Woboq Code Browser and used here https://github.com/sailfishos/qtwayland/blob/mer-5.6/src/compositor/wayland_wrapper/qwlsurface.cpp#L526 but I think that as seen from Qt code it might need to take into account the native display orientation (which probably could be obtained getting the display orientation and display mode information and comparing the width and height) when selecting the value but I have only seen such on some tablets but I haven’t yet tested how the above code would behave on such a device.