Skip to content
  • Matt Fischer's avatar
    Define WIN32_LEAN_AND_MEAN in Windows port · 5cef4cbf
    Matt Fischer authored and Ralf Habacker's avatar Ralf Habacker committed
    <windows.h> somewhat cloyingly attempts to include <winsock.h>
    by default, which causes problems if the rest of the program
    is trying to use the incompatible <winsock2.h>.  The Windows
    sysdep header attempts to prevent this by forcibly defining
    the winsock header guard macro, so that it will not be included.
    However, this does not work on MinGW because it uses a different
    guard macro name.
    
    This patch changes the code to instead define WIN32_LEAN_AND_MEAN,
    which is a more portable way to ensure that <winsock.h> will not
    be included.
    
    Bug: https://bugs.freedesktop.org/show_bug.cgi?id=71405
    
    
    Reviewed-By: default avatarRalf Habacker <ralf.habacker@freenet.de>
    5cef4cbf