Quellcode durchsuchen

fix msvc detection

Julius Pfrommer vor 9 Jahren
Ursprung
Commit
792266d151
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      examples/networklayer_tcp.c

+ 1 - 1
examples/networklayer_tcp.c

@@ -430,7 +430,7 @@ UA_ServerNetworkLayer * ServerNetworkLayerTCP_new(UA_ConnectionConfig conf, UA_U
     if(gethostname(hostname, 255) == 0) {
     if(gethostname(hostname, 255) == 0) {
         char discoveryUrl[256];
         char discoveryUrl[256];
         UA_String str;
         UA_String str;
-#ifndef _MSVC
+#ifndef _MSC_VER
         str.length = snprintf(discoveryUrl, 255, "opc.tcp://%s:%d", hostname, port);
         str.length = snprintf(discoveryUrl, 255, "opc.tcp://%s:%d", hostname, port);
 #else
 #else
         str.length = _snprintf_s(discoveryUrl, 255, _TRUNCATE, "opc.tcp://%s:%d", hostname, port);
         str.length = _snprintf_s(discoveryUrl, 255, _TRUNCATE, "opc.tcp://%s:%d", hostname, port);