• P
    w32: include winsock2.h before windows.h · 1834ed3a
    Paolo Bonzini 提交于
    Recent Fedora complains while compiling ui/sdl.c:
    
        /usr/x86_64-w64-mingw32/sys-root/mingw/include/winsock2.h:15:2: warning: #warning Please include winsock2.h before windows.h [-Wcpp]
    
    And with this patch we dutifully obey.
    
    Stefan Weil:
    
    Without that patch, windows.h will include winsock.h
    (which conflicts with winsock2.h) when compiling sdl.c.
    
    Normally we define WIN32_LEAN_AND_MEAN, and
    windows.h won't include winsock.h.
    
    include/ui/sdl2.h and ui/sdl.c undefine that macro,
    so the order of the include files is important.
    Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
    Reviewed-by: NStefan Weil <sw@weilnetz.de>
    Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
    1834ed3a
os-win32.h 3.8 KB