xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.


Ticket #1691: winkerberos-mingw.patch

File winkerberos-mingw.patch, 1.6 KB (added by Antoine Martin, 3 years ago)

patch for building with mingw

  • src/kerberos_sspi.h

    a b  
    2020#include <Windows.h>
    2121#include <sspi.h>
    2222
     23typedef struct _SecPkgContext_Bindings {
     24  unsigned long        BindingsLength;
     25  SEC_CHANNEL_BINDINGS *Bindings;
     26} SecPkgContext_Bindings, *PSecPkgContext_Bindings;
     27
    2328#define AUTH_GSS_ERROR -1
    2429#define AUTH_GSS_COMPLETE 1
    2530#define AUTH_GSS_CONTINUE 0
  • setup.py

    old new  
    8282else:
    8383    test_suite = "test"
    8484
     85chost = os.environ.get("MINGW_CHOST") #ie: i686-w64-mingw32
     86if chost:
     87    #mingw build
     88    #libpath = os.environ.get("SYSTEMDRIVE", "C:")+os.environ.get("MINGW_PREFIX", "/mingw32")+"/"+chost+"/lib"
     89    libpath = os.environ.get("MINGW_PREFIX", "/mingw32")+"/"+chost+"/lib"
     90    ela = ["-lssl", "-lcrypto", "-fPIC",
     91           "%s/libcrypt32.a" % libpath, "%s/libsecur32.a" % libpath, "%s/libshlwapi.a" % libpath]
     92else:
     93    #msvc:
     94    ela = ['crypt32.lib', 'secur32.lib', 'Shlwapi.lib',
     95           '/NXCOMPAT', '/DYNAMICBASE']
     96
    8597setup(
    8698    name="winkerberos",
    8799    version="0.7.0",
     
    114126    ext_modules = [
    115127        Extension(
    116128            "winkerberos",
    117             extra_link_args=['crypt32.lib',
    118                              'secur32.lib',
    119                              'Shlwapi.lib',
    120                              '/NXCOMPAT',
    121                              '/DYNAMICBASE'],
     129            extra_link_args=ela,
    122130            sources = [
    123131                "src/winkerberos.c",
    124132                "src/kerberos_sspi.c"