Prevent macro error
[platform/upstream/iotivity.git] / resource / csdk / connectivity / src / tcp_adapter / catcpadapter.c
index edef92e..5c4c581 100644 (file)
@@ -23,7 +23,9 @@
 #include <string.h>
 #include <stdint.h>
 
+#ifndef __STDC_FORMAT_MACROS
 #define __STDC_FORMAT_MACROS
+#endif
 #include <inttypes.h>
 
 #include "cainterface.h"
@@ -248,8 +250,10 @@ CAResult_t CAInitializeTCP(CARegisterConnectivityCallback registerCallback,
         .GetnetInfo = CAGetTCPInterfaceInformation,
         .readData = CAReadTCPData,
         .stopAdapter = CAStopTCP,
-        .terminate = CATerminateTCP };
-    registerCallback(TCPHandler, CA_ADAPTER_TCP);
+        .terminate = CATerminateTCP,
+        .cType = CA_ADAPTER_TCP};
+
+    registerCallback(TCPHandler);
 
     OIC_LOG(INFO, TAG, "OUT IntializeTCP is Success");
     return CA_STATUS_OK;