Przeglądaj źródła

win32 workarounds

David Rose 23 lat temu
rodzic
commit
0cb3570746

+ 1 - 1
panda/src/downloader/httpClient.cxx

@@ -954,7 +954,7 @@ parse_x509_name(const string &source) {
         }
       }
 
-      int nid = OBJ_txt2nid(type.c_str());
+      int nid = OBJ_txt2nid((char *)type.c_str());
       if (nid == NID_undef) {
         downloader_cat.info()
           << "Unknown type " << type << " in X509 name: " << source

+ 5 - 0
panda/src/downloader/httpClient.h

@@ -34,6 +34,11 @@
 
 #include <openssl/ssl.h>
 
+// Windows may define this macro inappropriately.
+#ifdef WIN32
+#undef X509_NAME
+#endif
+
 class Filename;
 
 ////////////////////////////////////////////////////////////////////