瀏覽代碼

iotivity: update to version 1.0.0

This brings IoTivity to version 1.0.0. The patches removed by this
commit are merged upstream now. There are some new patches needed for
new problems with Big Endian CPUs and also for musl. The plugin manager
was removed in upstream IoTivity 1.0.0.

Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
Hauke Mehrtens 9 年之前
父節點
當前提交
f5e06e1205
共有 19 個檔案被更改,包括 347 行新增713 行删除
  1. 30
    45
      net/iotivity/Makefile
  2. 25
    9
      net/iotivity/patches/001-no_unit_test.patch
  3. 1
    1
      net/iotivity/patches/004-use-env.patch
  4. 26
    0
      net/iotivity/patches/010-big-endian.patch
  5. 31
    0
      net/iotivity/patches/011-musl-use-inttypes.patch
  6. 161
    0
      net/iotivity/patches/012-connectivity-fix-getnameinfo-call-for-musl-libc.patch
  7. 53
    0
      net/iotivity/patches/030-remove-check-for-curl.patch
  8. 0
    49
      net/iotivity/patches/060-liboc-add-missing-depending-library.patch
  9. 0
    42
      net/iotivity/patches/061-things-manager-libTGMSDKLibrary.so-add-missing-depen.patch
  10. 0
    32
      net/iotivity/patches/062-soft-sensor-manager-libSSMCore.so-add-missing-depend.patch
  11. 0
    39
      net/iotivity/patches/063-mqtt-fan-libmosquittopp.so-add-missing-depending-lib.patch
  12. 0
    42
      net/iotivity/patches/064-protocol-plugin-libfanserver_mqtt_plugin.so-and-libl.patch
  13. 0
    69
      net/iotivity/patches/065-resource-manipulation-libserver_builder.so-add-missi.patch
  14. 0
    54
      net/iotivity/patches/066-csdk-remove-dependency-to-liboc_logger.so-in-c-code.patch
  15. 0
    37
      net/iotivity/patches/067-csdk-libconnectivity_abstraction.so-add-missing-depe.patch
  16. 0
    227
      net/iotivity/patches/068-build-make-build-fail-if-unresolved-symbols-found.patch
  17. 0
    29
      net/iotivity/patches/070-Avoid-Segv-by-testing-address-field-before-using-it.patch
  18. 0
    29
      net/iotivity/patches/090-resource-encapsulation-fix-build-without-curl.patch
  19. 20
    9
      net/iotivity/patches/140-remove-glib2.patch

+ 30
- 45
net/iotivity/Makefile 查看文件

@@ -8,13 +8,13 @@
8 8
 include $(TOPDIR)/rules.mk
9 9
 
10 10
 PKG_NAME:=iotivity
11
-PKG_VERSION:=0.9.2
11
+PKG_VERSION:=1.0.0
12 12
 PKG_RELEASE=1
13 13
 
14 14
 PKG_SOURCE:=${PKG_NAME}-${PKG_VERSION}.tar.gz
15 15
 PKG_SOURCE_URL:=https://downloads.iotivity.org/${PKG_VERSION}/ \
16 16
 	http://mirrors.kernel.org/${PKG_NAME}/${PKG_VERSION}/
17
-PKG_MD5SUM:=cf32e10a8f355fe1327db98ffc9a6173
17
+PKG_MD5SUM:=4bcbabffc1734c664bbdf8fedfa60543
18 18
 PKG_USE_MIPS16:=0
19 19
 
20 20
 PKG_MAINTAINER:=Hauke Mehrtens <hauke.mehrtens@lantiq.com>
@@ -22,8 +22,6 @@ PKG_MAINTAINER:=Hauke Mehrtens <hauke.mehrtens@lantiq.com>
22 22
 PKG_LICENSE:=Apache-2.0
23 23
 PKG_LICENSE_FILES:=LICENSE.md
24 24
 
25
-PKG_BUILD_DEPENDS:= +boost +libexpat
26
-
27 25
 include $(INCLUDE_DIR)/package.mk
28 26
 include $(INCLUDE_DIR)/scons.mk
29 27
 
@@ -69,32 +67,6 @@ define Package/iotivity-things-manager-lib/description
69 67
 endef
70 68
 
71 69
 
72
-define Package/iotivity-plugin-manager-lib
73
-  SECTION:=net
74
-  CATEGORY:=Network
75
-  DEPENDS:=iotivity +iotivity-cpp +libexpat +boost +boost-system
76
-  TITLE:=IoTivity plugin manager lib
77
-  URL:=https://www.iotivity.org
78
-endef
79
-
80
-define Package/iotivity-plugin-manager-lib/description
81
-    IoTivity plugin manager lib
82
-endef
83
-
84
-
85
-define Package/iotivity-mqttclient
86
-  SECTION:=net
87
-  CATEGORY:=Network
88
-  DEPENDS:=iotivity +iotivity-cpp +iotivity-plugin-manager-lib +boost +boost-system
89
-  TITLE:=IoTivity mqtt Client
90
-  URL:=https://www.iotivity.org
91
-endef
92
-
93
-define Package/iotivity-mqttclient/description
94
-    IoTivity mqtt Client
95
-endef
96
-
97
-
98 70
 define Package/iotivity-oic-middle
99 71
   SECTION:=net
100 72
   CATEGORY:=Network
@@ -135,7 +107,7 @@ endef
135 107
 
136 108
 
137 109
 PKG_TINYCBOR_NAME:=tinycbor
138
-PKG_TINYCBOR_VERSION:=3e83c0dc6e55bc73e9a4a7343ab8e06c43127efa
110
+PKG_TINYCBOR_VERSION:=43e3ac9490cf19459ec7b7bd13df3b66810fb62a
139 111
 PKG_TINYCBOR_SOURCE:=$(PKG_TINYCBOR_NAME)-$(PKG_TINYCBOR_VERSION).tar.bz2
140 112
 PKG_TINYCBOR_PROTO:=git
141 113
 PKG_TINYCBOR_SOURCE_URL:=https://github.com/01org/tinycbor.git
@@ -152,15 +124,37 @@ define Download/iotivity-tinycbor
152 124
 endef
153 125
 $(eval $(call Download,iotivity-tinycbor))
154 126
 
127
+PKG_SQLITE_NAME:=sqlite
128
+PKG_SQLITE_VERSION:=3081101
129
+PKG_SQLITE_SOURCE:=$(PKG_SQLITE_NAME)-amalgamation-$(PKG_SQLITE_VERSION).zip
130
+PKG_SQLITE_SOURCE_URL:=http://www.sqlite.org/2015/
131
+PKG_SQLITE_SUBDIR:=$(PKG_SQLITE_NAME)
132
+PKG_SQLITE_MD5SUM:=94907e831502e2080b76e281cfa24dde
133
+
134
+define Download/iotivity-sqlite
135
+  FILE:=$(PKG_SQLITE_SOURCE)
136
+  URL:=$(PKG_SQLITE_SOURCE_URL)
137
+  VERSION:=$(PKG_SQLITE_VERSION)
138
+  SUBDIR:=$(PKG_SQLITE_SUBDIR)
139
+  MD5SUM:=$(PKG_SQLITE_MD5SUM)
140
+endef
141
+$(eval $(call Download,iotivity-sqlite))
142
+
155 143
 
156 144
 SCONS_OPTIONS += \
157 145
 	TARGET_OS=linux \
158
-	TARGET_TRANSPORT=ALL \
146
+	TARGET_TRANSPORT=IP \
159 147
 	TARGET_ARCH=$(ARCH) \
160 148
 	STAGING_DIR=$(STAGING_DIR) \
161 149
 	LOGGING=true \
162 150
 	SECURED=1 \
163
-	mqttclient examples samples libTGMSDK ConServerApp ConClientApp BootstrapServerApp
151
+	$(if $(CONFIG_PACKAGE_iotivity),liboctbstack) \
152
+	$(if $(CONFIG_PACKAGE_iotivity-cpp),liboc) \
153
+	$(if $(CONFIG_PACKAGE_iotivity-things-manager-lib),libTGMSDK) \
154
+	$(if $(CONFIG_PACKAGE_iotivity-oic-middle),samples) \
155
+	$(if $(CONFIG_PACKAGE_iotivity-things-manager),ConServerApp ConClientApp BootstrapServerApp) \
156
+	$(if $(CONFIG_PACKAGE_iotivity-example-garage),examples) \
157
+
164 158
 
165 159
 ifneq ($(findstring c,$(OPENWRT_VERBOSE)),)
166 160
   SCONS_OPTIONS += VERBOSE=true
@@ -169,6 +163,9 @@ endif
169 163
 define Build/Prepare
170 164
 	$(call Build/Prepare/Default)
171 165
 	$(TAR) -C $(PKG_BUILD_DIR)/extlibs/tinycbor/ -xjf $(DL_DIR)/$(PKG_TINYCBOR_SOURCE)
166
+	unzip -d $(PKG_BUILD_DIR)/extlibs/sqlite3/ $(DL_DIR)/$(PKG_SQLITE_SOURCE)
167
+	mv $(PKG_BUILD_DIR)/extlibs/sqlite3/$(PKG_SQLITE_NAME)-amalgamation-$(PKG_SQLITE_VERSION)/sqlite3.h $(PKG_BUILD_DIR)/extlibs/sqlite3/
168
+	mv $(PKG_BUILD_DIR)/extlibs/sqlite3/$(PKG_SQLITE_NAME)-amalgamation-$(PKG_SQLITE_VERSION)/sqlite3.c $(PKG_BUILD_DIR)/extlibs/sqlite3/
172 169
 endef
173 170
 
174 171
 
@@ -197,16 +194,6 @@ define Package/iotivity-things-manager-lib/install
197 194
 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/libTGMSDKLibrary.so $(1)/usr/lib/
198 195
 endef
199 196
 
200
-define Package/iotivity-plugin-manager-lib/install
201
-	$(INSTALL_DIR) $(1)/usr/lib
202
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/libpmimpl.so $(1)/usr/lib/
203
-endef
204
-
205
-define Package/iotivity-mqttclient/install
206
-	$(INSTALL_DIR) $(1)/usr/bin
207
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/service/protocol-plugin/sample-app/linux/mqtt/mqttclient $(1)/usr/bin/
208
-endef
209
-
210 197
 define Package/iotivity-oic-middle/install
211 198
 	$(INSTALL_DIR) $(1)/usr/bin
212 199
 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/out/linux/$(ARCH)/release/examples/OICMiddle/OICMiddle $(1)/usr/bin/
@@ -229,8 +216,6 @@ endef
229 216
 $(eval $(call BuildPackage,iotivity))
230 217
 $(eval $(call BuildPackage,iotivity-cpp))
231 218
 $(eval $(call BuildPackage,iotivity-things-manager-lib))
232
-$(eval $(call BuildPackage,iotivity-plugin-manager-lib))
233
-$(eval $(call BuildPackage,iotivity-mqttclient))
234 219
 $(eval $(call BuildPackage,iotivity-oic-middle))
235 220
 $(eval $(call BuildPackage,iotivity-things-manager))
236 221
 $(eval $(call BuildPackage,iotivity-example-garage))

+ 25
- 9
net/iotivity/patches/001-no_unit_test.patch 查看文件

@@ -1,6 +1,6 @@
1 1
 --- a/resource/SConscript
2 2
 +++ b/resource/SConscript
3
-@@ -67,7 +67,7 @@ if target_os == 'linux':
3
+@@ -71,7 +71,7 @@ if target_os == 'linux':
4 4
  	SConscript('csdk/stack/samples/linux/secure/SConscript')
5 5
  
6 6
  	# Build C/C++ unit tests
@@ -11,14 +11,30 @@
11 11
  	env.Command('../../out/darwin/iotivity-csdk.framework',None,src_dir + '/tools/darwin/mkfwk_osx.sh')
12 12
 --- a/service/resource-encapsulation/SConscript
13 13
 +++ b/service/resource-encapsulation/SConscript
14
-@@ -101,7 +101,7 @@ SConscript('examples/SConscript')
14
+@@ -113,10 +113,10 @@ SConscript('examples/SConscript')
15
+ # Build UnitTests Resource Client , resourceCache and resourceBroker and 
16
+ # DiscoveryManager
17
+ ################################################ ######################
18
+-if target_os == 'linux':
19
+-    SConscript('unittests/SConscript')
20
+-    SConscript('src/resourceCache/unittests/SConscript')
21
+-    SConscript('src/resourceBroker/unittest/SConscript')
22
++# if target_os == 'linux':
23
++#     SConscript('unittests/SConscript')
24
++#     SConscript('src/resourceCache/unittests/SConscript')
25
++#     SConscript('src/resourceBroker/unittest/SConscript')
26
+ 
27
+ if target_os == 'android':
28
+     SConscript('android/SConscript')
29
+\ No newline at end of file
30
+--- a/service/things-manager/SConscript
31
++++ b/service/things-manager/SConscript
32
+@@ -71,6 +71,6 @@ SConscript('sampleapp/SConscript')
15 33
  ######################################################################
16
- # Build UnitTests Resource Client , resourceCache and resourceBroker
34
+ # Build UnitTests Things Manager
17 35
  ################################################ ######################
18
--SConscript('unittests/SConscript')
19
--SConscript('src/resourceCache/unittests/SConscript')
20
--SConscript('src/resourceBroker/unittest/SConscript')
21
-+#SConscript('unittests/SConscript')
22
-+#SConscript('src/resourceCache/unittests/SConscript')
23
-+#SConscript('src/resourceBroker/unittest/SConscript')
36
+-if target_os == 'linux':
37
+-    SConscript('unittests/SConscript')
38
++# if target_os == 'linux':
39
++#     SConscript('unittests/SConscript')
24 40
  

+ 1
- 1
net/iotivity/patches/004-use-env.patch 查看文件

@@ -9,7 +9,7 @@ Subject: [PATCH 3/4] 004-use-env.patch
9 9
 
10 10
 --- a/build_common/SConscript
11 11
 +++ b/build_common/SConscript
12
-@@ -129,6 +129,26 @@ tc_set_msg = '''
12
+@@ -137,6 +137,26 @@ tc_set_msg = '''
13 13
  * cause inexplicable errors.                                                  *
14 14
  *******************************************************************************
15 15
  '''

+ 26
- 0
net/iotivity/patches/010-big-endian.patch 查看文件

@@ -0,0 +1,26 @@
1
+From d647872aee4871e286ddedf4931792086f5b4565 Mon Sep 17 00:00:00 2001
2
+From: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
3
+Date: Mon, 26 Oct 2015 14:32:39 +0100
4
+Subject: [PATCH] libcoap: remove fix build error on big endian systems
5
+
6
+In the big endian case an additional typedef is added in a wrong
7
+position in TinyDTLS. This breaks compiling this code on big endian
8
+systems.
9
+
10
+Change-Id: Iad854aba112ddb23bf490b064ec6fbf5d01ce6b6
11
+Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
12
+---
13
+ resource/csdk/connectivity/lib/libcoap-4.1.1/pdu.h |    2 +-
14
+ 1 file changed, 1 insertion(+), 1 deletion(-)
15
+
16
+--- a/resource/csdk/connectivity/lib/libcoap-4.1.1/pdu.h
17
++++ b/resource/csdk/connectivity/lib/libcoap-4.1.1/pdu.h
18
+@@ -194,7 +194,7 @@ typedef enum
19
+ #ifdef WORDS_BIGENDIAN
20
+ typedef union
21
+ {
22
+-    typedef struct
23
++    struct
24
+     {
25
+         unsigned int version:2; /* protocol version */
26
+         unsigned int type:2; /* type flag */

+ 31
- 0
net/iotivity/patches/011-musl-use-inttypes.patch 查看文件

@@ -0,0 +1,31 @@
1
+From 9510445c5002b0e3502d2ac09723e1b2ddd03704 Mon Sep 17 00:00:00 2001
2
+From: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
3
+Date: Mon, 26 Oct 2015 14:39:55 +0100
4
+Subject: [PATCH] tinydtls: use types from inittype.h, fix musl libc
5
+
6
+The SHA2 code currently uses u_int32_t and similar types without
7
+defining them. This type is not defined by the POSIX standard, but many
8
+libc implementations have it as a non standard extension. In the musl
9
+libc it is not implemented and I am getting a compile error when using
10
+u_int32_t, I should use uint32_t, which is done when
11
+SHA2_USE_INTTYPES_H is set.
12
+
13
+This fixes build with musl libs used in OpenWrt.
14
+
15
+Change-Id: I485435ddb8b1a2359caedd335ab54f91ca5e3f3e
16
+Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
17
+---
18
+ extlibs/tinydtls/SConscript |    2 +-
19
+ 1 file changed, 1 insertion(+), 1 deletion(-)
20
+
21
+--- a/extlibs/tinydtls/SConscript
22
++++ b/extlibs/tinydtls/SConscript
23
+@@ -68,7 +68,7 @@ if not env.get('RELEASE'):
24
+ else:
25
+ 	env.AppendUnique(CPPDEFINES = ['NDEBUG'])
26
+ 
27
+-env.AppendUnique(CPPDEFINES = ['DTLSV12',  'WITH_SHA256', 'DTLS_CHECK_CONTENTTYPE'])
28
++env.AppendUnique(CPPDEFINES = ['DTLSV12',  'WITH_SHA256', 'DTLS_CHECK_CONTENTTYPE', 'SHA2_USE_INTTYPES_H'])
29
+ 
30
+ 
31
+ libtinydtls = env.StaticLibrary('libtinydtls', env.get('TINYDTLS_SRC'), OBJPREFIX='libtinydtls_')

+ 161
- 0
net/iotivity/patches/012-connectivity-fix-getnameinfo-call-for-musl-libc.patch 查看文件

@@ -0,0 +1,161 @@
1
+From 75a19e9059e671442abe40908ba80c2da614118d Mon Sep 17 00:00:00 2001
2
+From: Hauke Mehrtens <hauke@hauke-m.de>
3
+Date: Mon, 26 Oct 2015 22:42:40 +0100
4
+Subject: [PATCH] connectivity: fix getnameinfo() call for musl libc
5
+
6
+The musl libc and also the libc from net/freebsd are currently checking
7
+if the size of the sockaddr given to getnameinfo() matches the size for
8
+this family and it fails when giving sizeof(struct sockaddr_storage).
9
+This patch fixes this problem by making the caller also provide the
10
+size of the struct sockaddr_storage.
11
+
12
+I am currently trying to get a fix for this problem into musl libc, but
13
+IoTivity should still fix this.
14
+
15
+This also fixes a wrong error message.
16
+
17
+Change-Id: Ie9b89523b5ba20e536c03e3ad85c65bd5ff2ba53
18
+Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
19
+---
20
+ resource/csdk/connectivity/inc/caadapterutils.h              | 12 ++++++++----
21
+ .../csdk/connectivity/src/adapter_util/caadapternetdtls.c    | 10 +++++-----
22
+ resource/csdk/connectivity/src/adapter_util/caadapterutils.c |  9 +++++----
23
+ resource/csdk/connectivity/src/ip_adapter/caipserver.c       |  2 +-
24
+ resource/csdk/connectivity/src/tcp_adapter/catcpserver.c     |  2 +-
25
+ 5 files changed, 20 insertions(+), 15 deletions(-)
26
+
27
+--- a/resource/csdk/connectivity/inc/caadapterutils.h
28
++++ b/resource/csdk/connectivity/inc/caadapterutils.h
29
+@@ -212,13 +212,16 @@ void CAClearNetInterfaceInfoList(u_array
30
+  */
31
+ void CAClearServerInfoList(u_arraylist_t *serverInfoList);
32
+ 
33
++#ifndef WITH_ARDUINO
34
+ /**
35
+  * Convert address from binary to string.
36
+- * @param[in]    ipaddr   IP address info.
37
+- * @param[out]   host     address string (must be CA_IPADDR_SIZE).
38
+- * @param[out]   port     host order port number.
39
++ * @param[in]    sockAddr     IP address info.
40
++ * @param[in]    sockAddrLen  size of sockAddr.
41
++ * @param[out]   host         address string (must be CA_IPADDR_SIZE).
42
++ * @param[out]   port         host order port number.
43
+  */
44
+-void CAConvertAddrToName(const struct sockaddr_storage *sockaddr, char *host, uint16_t *port);
45
++void CAConvertAddrToName(const struct sockaddr_storage *sockAddr, socklen_t sockAddrLen,
46
++                         char *host, uint16_t *port);
47
+ 
48
+ /**
49
+  * Convert address from string to binary.
50
+@@ -227,6 +230,7 @@ void CAConvertAddrToName(const struct so
51
+  * @param[out]  ipaddr    IP address info.
52
+  */
53
+ void CAConvertNameToAddr(const char *host, uint16_t port, struct sockaddr_storage *sockaddr);
54
++#endif /* WITH_ARDUINO */
55
+ 
56
+ #ifdef __ANDROID__
57
+ /**
58
+--- a/resource/csdk/connectivity/src/adapter_util/caadapternetdtls.c
59
++++ b/resource/csdk/connectivity/src/adapter_util/caadapternetdtls.c
60
+@@ -417,7 +417,7 @@ static int32_t CAReadDecryptedPayload(dt
61
+             ((addrInfo->addr.st.ss_family == AF_INET) ? CA_IPV4 : CA_IPV6) | CA_SECURE, .port = 0 },
62
+             .identity =
63
+             { 0 } };
64
+-    CAConvertAddrToName(&(addrInfo->addr.st), sep.endpoint.addr, &sep.endpoint.port);
65
++    CAConvertAddrToName(&(addrInfo->addr.st), addrInfo->size, sep.endpoint.addr, &sep.endpoint.port);
66
+ 
67
+     if (NULL == g_caDtlsContext)
68
+     {
69
+@@ -468,7 +468,7 @@ static int32_t CASendSecureData(dtls_con
70
+ 
71
+     CAEndpoint_t endpoint = {.adapter = CA_DEFAULT_ADAPTER};
72
+ 
73
+-    CAConvertAddrToName(&(addrInfo->addr.st), endpoint.addr, &endpoint.port);
74
++    CAConvertAddrToName(&(addrInfo->addr.st), addrInfo->size, endpoint.addr, &endpoint.port);
75
+     endpoint.flags = addrInfo->addr.st.ss_family == AF_INET ? CA_IPV4 : CA_IPV6;
76
+     endpoint.flags |= CA_SECURE;
77
+     endpoint.adapter = CA_ADAPTER_IP;
78
+@@ -515,7 +515,7 @@ static int32_t CAHandleSecureEvent(dtls_
79
+         stCADtlsAddrInfo_t *addrInfo = (stCADtlsAddrInfo_t *)session;
80
+         char peerAddr[MAX_ADDR_STR_SIZE_CA] = { 0 };
81
+         uint16_t port = 0;
82
+-        CAConvertAddrToName(&(addrInfo->addr.st), peerAddr, &port);
83
++        CAConvertAddrToName(&(addrInfo->addr.st), addrInfo->size, peerAddr, &port);
84
+         CARemovePeerFromPeerInfoList(peerAddr, port);
85
+     }
86
+ 
87
+@@ -553,7 +553,7 @@ static int32_t CAGetPskCredentials(dtls_
88
+         stCADtlsAddrInfo_t *addrInfo = (stCADtlsAddrInfo_t *)session;
89
+         char peerAddr[MAX_ADDR_STR_SIZE_CA] = { 0 };
90
+         uint16_t port = 0;
91
+-        CAConvertAddrToName(&(addrInfo->addr.st), peerAddr, &port);
92
++        CAConvertAddrToName(&(addrInfo->addr.st), addrInfo->size, peerAddr, &port);
93
+ 
94
+         if(CA_STATUS_OK != CAAddIdToPeerInfoList(peerAddr, port, desc, descLen) )
95
+         {
96
+@@ -933,7 +933,7 @@ static int CAVerifyCertificate(struct dt
97
+     stCADtlsAddrInfo_t *addrInfo = (stCADtlsAddrInfo_t *)session;
98
+     char peerAddr[MAX_ADDR_STR_SIZE_CA] = { 0 };
99
+     uint16_t port = 0;
100
+-    CAConvertAddrToName(&(addrInfo->addr.st), peerAddr, &port);
101
++    CAConvertAddrToName(&(addrInfo->addr.st), addrInfo->size, peerAddr, &port);
102
+ 
103
+     CAResult_t result = CAAddIdToPeerInfoList(peerAddr, port,
104
+             crtChain[0].subject.data + DER_SUBJECT_HEADER_LEN + 2, crtChain[0].subject.data[DER_SUBJECT_HEADER_LEN + 1]);
105
+--- a/resource/csdk/connectivity/src/adapter_util/caadapterutils.c
106
++++ b/resource/csdk/connectivity/src/adapter_util/caadapterutils.c
107
+@@ -122,14 +122,15 @@ CAResult_t CAParseIPv4AddressInternal(co
108
+  * These two conversion functions return void because errors can't happen
109
+  * (because of NI_NUMERIC), and there's nothing to do if they do happen.
110
+  */
111
+-void CAConvertAddrToName(const struct sockaddr_storage *sockAddr, char *host, uint16_t *port)
112
++void CAConvertAddrToName(const struct sockaddr_storage *sockAddr, socklen_t sockAddrLen,
113
++                         char *host, uint16_t *port)
114
+ {
115
+     VERIFY_NON_NULL_VOID(sockAddr, CA_ADAPTER_UTILS_TAG, "sockAddr is null");
116
+     VERIFY_NON_NULL_VOID(host, CA_ADAPTER_UTILS_TAG, "host is null");
117
+     VERIFY_NON_NULL_VOID(port, CA_ADAPTER_UTILS_TAG, "port is null");
118
+ 
119
+     int r = getnameinfo((struct sockaddr *)sockAddr,
120
+-                        sizeof (struct sockaddr_storage),
121
++                        sockAddrLen,
122
+                         host, MAX_ADDR_STR_SIZE_CA,
123
+                         NULL, 0,
124
+                         NI_NUMERICHOST|NI_NUMERICSERV);
125
+@@ -138,12 +139,12 @@ void CAConvertAddrToName(const struct so
126
+         if (EAI_SYSTEM == r)
127
+         {
128
+             OIC_LOG_V(ERROR, CA_ADAPTER_UTILS_TAG,
129
+-                            "getaddrinfo failed: errno %s", strerror(errno));
130
++                            "getnameinfo failed: errno %s", strerror(errno));
131
+         }
132
+         else
133
+         {
134
+             OIC_LOG_V(ERROR, CA_ADAPTER_UTILS_TAG,
135
+-                            "getaddrinfo failed: %s", gai_strerror(r));
136
++                            "getnameinfo failed: %s", gai_strerror(r));
137
+         }
138
+         return;
139
+     }
140
+--- a/resource/csdk/connectivity/src/ip_adapter/caipserver.c
141
++++ b/resource/csdk/connectivity/src/ip_adapter/caipserver.c
142
+@@ -299,7 +299,7 @@ static CAResult_t CAReceiveMessage(int f
143
+         }
144
+     }
145
+ 
146
+-    CAConvertAddrToName(&srcAddr, sep.endpoint.addr, &sep.endpoint.port);
147
++    CAConvertAddrToName(&srcAddr, msg.msg_namelen, sep.endpoint.addr, &sep.endpoint.port);
148
+ 
149
+     if (flags & CA_SECURE)
150
+     {
151
+--- a/resource/csdk/connectivity/src/tcp_adapter/catcpserver.c
152
++++ b/resource/csdk/connectivity/src/tcp_adapter/catcpserver.c
153
+@@ -478,7 +478,7 @@ static void CAAcceptHandler(void *data)
154
+                 }
155
+                 svritem->u4tcp.fd = sockfd;
156
+ 
157
+-                CAConvertAddrToName((struct sockaddr_storage *)&clientaddr,
158
++                CAConvertAddrToName((struct sockaddr_storage *)&clientaddr, clientlen,
159
+                                     (char *) &svritem->addr, &svritem->u4tcp.port);
160
+ 
161
+                 ca_mutex_lock(g_mutexObjectList);

+ 53
- 0
net/iotivity/patches/030-remove-check-for-curl.patch 查看文件

@@ -0,0 +1,53 @@
1
+--- a/service/resource-container/SConscript
2
++++ b/service/resource-container/SConscript
3
+@@ -176,35 +176,21 @@ if target_os in ['linux', 'tizen', 'andr
4
+ # build hue sample bundle
5
+ ######################################################################
6
+ 
7
+-conf2 = Configure(lib_env)
8
+-if not conf2.CheckLib('curl'):
9
+-    print '''X
10
+-*********************************** Error *************************************
11
+-* Cannot build hue sample. Please install libcurl.
12
+-* Example (Ubuntu):
13
+-*   sudo apt-get install libcurl4-openssl-dev
14
+-*   sudo ldconfig
15
+-* Hint: check with pkg-config --libs libcurl and clear scons cache.
16
+-* Skipping hue sample build.
17
+-*******************************************************************************
18
+-    '''
19
+-else:
20
+-    hue_resource_bundle_env = resource_container_env.Clone()
21
+-    hue_resource_bundle_env.AppendUnique(CCFLAGS = ['-fPIC'])
22
+-
23
+-    HUE_RESOURCE_BUNDLE_DIR = 'examples/HueSampleBundle/'
24
+-    hue_resource_bundle_env.AppendUnique(CPPPATH = [
25
+-            HUE_RESOURCE_BUNDLE_DIR + 'include',
26
+-            'include/'
27
+-            ])
28
+-
29
+-    hue_resource_bundle_env.PrependUnique(LIBS = ['curl', 'rcs_container'])
30
+-
31
+-    hue_resource_bundle_src = [ Glob(HUE_RESOURCE_BUNDLE_DIR + 'src/*.cpp')]
32
+-
33
+-    HueBundle = hue_resource_bundle_env.SharedLibrary('HueBundle', hue_resource_bundle_src)
34
+-    hue_resource_bundle_env.InstallTarget(HueBundle, 'libHueBundle')
35
+-lib_env = conf2.Finish()
36
++hue_resource_bundle_env = resource_container_env.Clone()
37
++hue_resource_bundle_env.AppendUnique(CCFLAGS = ['-fPIC'])
38
++
39
++HUE_RESOURCE_BUNDLE_DIR = 'examples/HueSampleBundle/'
40
++hue_resource_bundle_env.AppendUnique(CPPPATH = [
41
++        HUE_RESOURCE_BUNDLE_DIR + 'include',
42
++        'include/'
43
++        ])
44
++
45
++hue_resource_bundle_env.PrependUnique(LIBS = ['curl', 'rcs_container'])
46
++
47
++hue_resource_bundle_src = [ Glob(HUE_RESOURCE_BUNDLE_DIR + 'src/*.cpp')]
48
++
49
++HueBundle = hue_resource_bundle_env.SharedLibrary('HueBundle', hue_resource_bundle_src)
50
++hue_resource_bundle_env.InstallTarget(HueBundle, 'libHueBundle')
51
+ 
52
+ ######################################################################
53
+ # build resource container unit tests

+ 0
- 49
net/iotivity/patches/060-liboc-add-missing-depending-library.patch 查看文件

@@ -1,49 +0,0 @@
1
-From b13839cceaae97d7d23b54586da1ad7ac85ab2b6 Mon Sep 17 00:00:00 2001
2
-From: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
3
-Date: Tue, 21 Jul 2015 20:50:39 +0200
4
-Subject: [PATCH] liboc: add missing depending library
5
-
6
-liboc.so depends on liboctbstack.so, liboc_logger.so and pthread, this
7
-patch adds these dependencies to the build.
8
-
9
-Without this the dynamic loader will not automatically load these
10
-libraries and it could result in unresolved dependencies at runtime.
11
-
12
-Change-Id: I971b45669adef31dc9cca719884ebeb74aaf735e
13
-Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
14
-Reviewed-on: https://gerrit.iotivity.org/gerrit/1794
15
-Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
16
-Reviewed-by: Erich Keane <erich.keane@intel.com>
17
----
18
- resource/src/SConscript |   14 ++++++++------
19
- 1 file changed, 8 insertions(+), 6 deletions(-)
20
-
21
---- a/resource/src/SConscript
22
-+++ b/resource/src/SConscript
23
-@@ -40,18 +40,20 @@ oclib_env.AppendUnique(CPPPATH = [
24
- 		'../csdk/connectivity/lib/libcoap-4.1.1'
25
- 		])
26
- 
27
-+oclib_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
28
-+
29
-+oclib_env.AppendUnique(LIBS = ['octbstack', 'oc_logger'])
30
-+
31
- target_os = env.get('TARGET_OS')
32
-+if target_os == 'linux':
33
-+	oclib_env.AppendUnique(LIBS = ['pthread'])
34
-+
35
- if target_os not in ['windows', 'winrt']:
36
- 	oclib_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall', '-fPIC'])
37
- 
38
- if target_os == 'android':
39
- 	oclib_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
40
--	oclib_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
41
--	oclib_env.AppendUnique(LIBS = ['octbstack', 'oc_logger', 'boost_thread', 'gnustl_shared', 'log'])
42
--
43
--if target_os in ['darwin', 'ios']:
44
--	oclib_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
45
--	oclib_env.AppendUnique(LIBS = ['octbstack', 'oc_logger'])
46
-+	oclib_env.AppendUnique(LIBS = ['boost_thread', 'gnustl_shared', 'log'])
47
- 
48
- ######################################################################
49
- # Source files and Targets

+ 0
- 42
net/iotivity/patches/061-things-manager-libTGMSDKLibrary.so-add-missing-depen.patch 查看文件

@@ -1,42 +0,0 @@
1
-From 0143dfaa7e6dace845412e97ebbf697d273b0d10 Mon Sep 17 00:00:00 2001
2
-From: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
3
-Date: Tue, 21 Jul 2015 22:06:52 +0200
4
-Subject: [PATCH] things-manager: libTGMSDKLibrary.so: add missing depending
5
- library
6
-
7
-libTGMSDKLibrary.so also depends on liboc.so, liboctbstack.so and
8
-pthread, this patch adds these dependencies to the build.
9
-
10
-Without this the dynamic loader will not automatically load these
11
-libraries and it could result in unresolved dependencies at runtime.
12
-
13
-Change-Id: I174b38e747be247fc25544db629f8ad2b7eb5ef5
14
-Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
15
-Reviewed-on: https://gerrit.iotivity.org/gerrit/1795
16
-Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
17
-Reviewed-by: Uze Choi <uzchoi@samsung.com>
18
----
19
- service/things-manager/SConscript |    5 ++++-
20
- 1 file changed, 4 insertions(+), 1 deletion(-)
21
-
22
---- a/service/things-manager/SConscript
23
-+++ b/service/things-manager/SConscript
24
-@@ -35,14 +35,17 @@ target_os = env.get('TARGET_OS')
25
- ######################################################################
26
- things_manager_env.AppendUnique(CPPPATH = ['../../extlibs/timer', 'sdk/inc', 'sdk/src'])
27
- 
28
-+things_manager_env.PrependUnique(LIBS = ['oc', 'octbstack'])
29
-+
30
- if target_os not in ['windows', 'winrt']:
31
-     things_manager_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall'])
32
-     if target_os != 'android':
33
-         things_manager_env.AppendUnique(CXXFLAGS = ['-pthread'])
34
-+        things_manager_env.AppendUnique(LIBS = ['pthread'])
35
- 
36
- if target_os == 'android':
37
-     things_manager_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
38
--    things_manager_env.PrependUnique(LIBS = ['oc', 'octbstack', 'gnustl_shared'])
39
-+    things_manager_env.PrependUnique(LIBS = ['gnustl_shared'])
40
- 
41
- ######################################################################
42
- # Source files and Targets

+ 0
- 32
net/iotivity/patches/062-soft-sensor-manager-libSSMCore.so-add-missing-depend.patch 查看文件

@@ -1,32 +0,0 @@
1
-From b52307797b91d7448a72874e4da7bed30c27a4f5 Mon Sep 17 00:00:00 2001
2
-From: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
3
-Date: Tue, 21 Jul 2015 22:29:14 +0200
4
-Subject: [PATCH] soft-sensor-manager: libSSMCore.so: add missing depending
5
- library
6
-
7
-libSSMCore.so also depends on libdl.so, this patch adds these
8
-dependencies to the build.
9
-
10
-Without this the dynamic loader will not automatically load these
11
-libraries and it could result in unresolved dependencies at runtime.
12
-
13
-Change-Id: I76faff46fe96caef75fb6673c7e83d62b15b8489
14
-Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
15
-Reviewed-on: https://gerrit.iotivity.org/gerrit/1796
16
-Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
17
-Reviewed-by: Uze Choi <uzchoi@samsung.com>
18
----
19
- service/soft-sensor-manager/SConscript |    2 +-
20
- 1 file changed, 1 insertion(+), 1 deletion(-)
21
-
22
---- a/service/soft-sensor-manager/SConscript
23
-+++ b/service/soft-sensor-manager/SConscript
24
-@@ -157,7 +157,7 @@ static_libssmcore = ssmcore_env.StaticLi
25
- 
26
- ssmcore_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
27
- ssmcore_env.AppendUnique(LIBS = ['oc', 'octbstack', 'oc_logger',
28
--            'connectivity_abstraction', 'coap'])
29
-+            'connectivity_abstraction', 'coap', 'dl'])
30
- 
31
- shared_libssmcore = ssmcore_env.SharedLibrary(
32
- 		target = 'SSMCore',

+ 0
- 39
net/iotivity/patches/063-mqtt-fan-libmosquittopp.so-add-missing-depending-lib.patch 查看文件

@@ -1,39 +0,0 @@
1
-From 60b43aed7e479bc6d7252f0dba2542fe7aab9195 Mon Sep 17 00:00:00 2001
2
-From: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
3
-Date: Tue, 21 Jul 2015 22:38:02 +0200
4
-Subject: [PATCH] mqtt-fan: libmosquittopp.so: add missing depending library
5
-
6
-libmosquittopp.so also depends on libpthread.so, this patch adds these
7
-dependencies to the build. In addition it puts the dependency to
8
-mosquitto to the beginning of the list. This is needed because
9
-mosquitto is a statically linked lib and it also has unresolved
10
-symbols, but gcc only searches the dynamic libs defined after the
11
-static for unresolved symbols in the static lib.
12
-
13
-Without this the dynamic loader will not automatically load these
14
-libraries and it could result in unresolved dependencies at runtime.
15
-
16
-Change-Id: I866a46305c31d37cf706b9f2b965e843c35c5667
17
-Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
18
-Reviewed-on: https://gerrit.iotivity.org/gerrit/1797
19
-Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
20
-Reviewed-by: Younghyun Joo <yh_.joo@samsung.com>
21
-Reviewed-by: Uze Choi <uzchoi@samsung.com>
22
----
23
- .../plugins/mqtt-fan/lib/cpp/SConscript            |    5 ++++-
24
- 1 file changed, 4 insertions(+), 1 deletion(-)
25
-
26
---- a/service/protocol-plugin/plugins/mqtt-fan/lib/cpp/SConscript
27
-+++ b/service/protocol-plugin/plugins/mqtt-fan/lib/cpp/SConscript
28
-@@ -16,7 +16,10 @@ mosquittopp_env.AppendUnique(CPPPATH = [
29
- if target_os not in ['windows', 'winrt']:
30
- 	mosquittopp_env.AppendUnique(CFLAGS = ['-Wall', '-ggdb', '-O2', '-fPIC'])
31
- 
32
--mosquittopp_env.AppendUnique(LIBS = ['mosquitto', 'ssl', 'crypto'])
33
-+if target_os == 'linux':
34
-+	mosquittopp_env.AppendUnique(LIBS = ['pthread'])
35
-+
36
-+mosquittopp_env.PrependUnique(LIBS = ['mosquitto', 'ssl', 'crypto'])
37
- ######################################################################
38
- # Source files and Targets
39
- ######################################################################

+ 0
- 42
net/iotivity/patches/064-protocol-plugin-libfanserver_mqtt_plugin.so-and-libl.patch 查看文件

@@ -1,42 +0,0 @@
1
-From d1fb4c055f168e68ffd2d5596eef8d96f6c6cfae Mon Sep 17 00:00:00 2001
2
-From: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
3
-Date: Tue, 21 Jul 2015 22:41:09 +0200
4
-Subject: [PATCH] protocol-plugin: libfanserver_mqtt_plugin.so and
5
- liblightserver_mqtt_plugin.so add missing depending library
6
-
7
-libfanserver_mqtt_plugin.so and liblightserver_mqtt_plugin.so are also
8
-depending on liboc.so and libcrypto.so, this patch adds these
9
-dependencies to the build. In addition it puts the dependency to
10
-mosquitto to the beginning of the list. This is needed because
11
-mosquitto is a statically linked lib and it also has unresolved
12
-symbols, but gcc only searches the dynamic libs defined after the
13
-static for unresolved symbols in the static lib.
14
-
15
-mosquitto was only build as a static linked library so we can use the
16
-normal LIBS mechanism and it will be statically linked.
17
-
18
-Without this the dynamic loader will not automatically load these
19
-libraries and it could result in unresolved dependencies at runtime.
20
-
21
-Change-Id: Ia130827d04bd3bb1a8863fc64d0097a076edc751
22
-Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
23
-Reviewed-on: https://gerrit.iotivity.org/gerrit/1798
24
-Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
25
-Reviewed-by: Younghyun Joo <yh_.joo@samsung.com>
26
-Reviewed-by: Uze Choi <uzchoi@samsung.com>
27
----
28
- service/protocol-plugin/plugins/SConscript |    3 +--
29
- 1 file changed, 1 insertion(+), 2 deletions(-)
30
-
31
---- a/service/protocol-plugin/plugins/SConscript
32
-+++ b/service/protocol-plugin/plugins/SConscript
33
-@@ -47,8 +47,7 @@ if target_os == 'android':
34
-     plugins_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
35
-     plugins_env.AppendUnique(LIBS = ['gnustl_shared'])
36
- 
37
--plugins_env.AppendUnique(LIBS = [File(env.get('BUILD_DIR') + '/libmosquitto.a'),
38
--        'mosquitto', 'ssl', 'rt'])
39
-+plugins_env.PrependUnique(LIBS = ['mosquitto', 'ssl', 'crypto', 'rt', 'oc'])
40
- 
41
- 
42
- ######################################################################

+ 0
- 69
net/iotivity/patches/065-resource-manipulation-libserver_builder.so-add-missi.patch 查看文件

@@ -1,69 +0,0 @@
1
-From 2993af980993ebb70b686b1a521d98d26e85cfc2 Mon Sep 17 00:00:00 2001
2
-From: Hauke Mehrtens <hauke@hauke-m.de>
3
-Date: Tue, 21 Jul 2015 20:55:50 +0200
4
-Subject: [PATCH] resource-manipulation: libserver_builder.so add missing
5
- depending library
6
-
7
-libserver_builder.so is also depending on liboc.so and
8
-librcs_common.so, this patch adds these dependencies to the build.
9
-
10
-liboctbstack.so is only needed when LOGGING=true is set. Without
11
-liboctbstack.so libserver_builder.so misses the dependencies to the
12
-OCLog and OCLogv symbols.
13
-Add LIBPATH to make sure the libs will be found, this fixes a problem
14
-in some jenkins tests.
15
-
16
-pthread is added two times, once should be enough.
17
-
18
-Without this the dynamic loader will not automatically load these
19
-libraries and it could result in unresolved dependencies at runtime.
20
-
21
-Change-Id: I6af126eb4af975b7231d01df922885c7dec5fc56
22
-Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
23
-Reviewed-on: https://gerrit.iotivity.org/gerrit/1799
24
-Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
25
-Reviewed-by: Uze Choi <uzchoi@samsung.com>
26
----
27
- .../src/serverBuilder/SConscript                   |   11 ++++++-----
28
- 1 file changed, 6 insertions(+), 5 deletions(-)
29
-
30
---- a/service/resource-encapsulation/src/serverBuilder/SConscript
31
-+++ b/service/resource-encapsulation/src/serverBuilder/SConscript
32
-@@ -47,6 +47,8 @@ server_builder_env.AppendUnique(CPPPATH
33
- 
34
- server_builder_env.AppendUnique(CPPPATH = [env.get('SRC_DIR')+'/extlibs', 'include'])
35
- 
36
-+server_builder_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
37
-+
38
- if target_os not in ['windows', 'winrt']:
39
-     server_builder_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall'])
40
-     if target_os != 'android':
41
-@@ -56,7 +58,10 @@ if target_os == 'android':
42
-     server_builder_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
43
-     server_builder_env.PrependUnique(LIBS = ['gnustl_shared', 'compatibility', 'log'])
44
- 
45
--server_builder_env.AppendUnique(LIBS = ['dl'])
46
-+server_builder_env.AppendUnique(LIBS = ['dl', 'oc', 'rcs_common'])
47
-+
48
-+if env.get('LOGGING'):
49
-+	server_builder_env.AppendUnique(LIBS = ['octbstack'])
50
- 
51
- if not release:
52
-     server_builder_env.AppendUnique(CXXFLAGS = ['--coverage'])
53
-@@ -77,7 +82,6 @@ server_builder_env.InstallTarget([server
54
- ######################################################################
55
- server_builder_test_env = server_builder_env.Clone();
56
- 
57
--server_builder_test_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
58
- server_builder_test_env.AppendUnique(CPPPATH = [
59
-     env.get('SRC_DIR')+'/extlibs/hippomocks-master',
60
-     gtest_dir + '/include',
61
-@@ -89,8 +93,6 @@ gtest_main = File(gtest_dir + '/lib/.lib
62
- 
63
- server_builder_test_env.PrependUnique(LIBS = [
64
-     'rcs_server',
65
--    'rcs_common',
66
--    'oc',
67
-     'octbstack',
68
-     'oc_logger',
69
-     'connectivity_abstraction',

+ 0
- 54
net/iotivity/patches/066-csdk-remove-dependency-to-liboc_logger.so-in-c-code.patch 查看文件

@@ -1,54 +0,0 @@
1
-From c02a2b8ad3efb0b59392b1c2d441e3f7144c1fda Mon Sep 17 00:00:00 2001
2
-From: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
3
-Date: Tue, 21 Jul 2015 22:45:40 +0200
4
-Subject: [PATCH] csdk: remove dependency to liboc_logger.so in c code
5
-
6
-The liboc_logger.so is only used by the c++ part and not by the c part,
7
-remove it from the c only part.
8
-
9
-Change-Id: Ib0894974de8ef7150401f02fbd0ea864d1d6f2cd
10
-Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
11
-Reviewed-on: https://gerrit.iotivity.org/gerrit/1801
12
-Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
13
-Reviewed-by: Charlie Lenahan <charlie.lenahan@intel.com>
14
-Reviewed-by: Erich Keane <erich.keane@intel.com>
15
----
16
- resource/csdk/connectivity/test/SConscript         |    3 ---
17
- .../samples/linux/SimpleClientServer/SConscript    |    2 +-
18
- .../csdk/stack/samples/linux/secure/SConscript     |    2 +-
19
- 3 files changed, 2 insertions(+), 5 deletions(-)
20
-
21
---- a/resource/csdk/connectivity/test/SConscript
22
-+++ b/resource/csdk/connectivity/test/SConscript
23
-@@ -58,9 +58,6 @@ target_os = env.get('TARGET_OS')
24
- if target_os not in ['arduino', 'darwin', 'ios']:
25
- 	catest_env.AppendUnique(LIBS=['rt'])
26
- 
27
--if target_os != 'darwin':
28
--    catest_env.PrependUnique(LIBS = ['oc_logger'])
29
--
30
- if env.get('SECURED') == '1':
31
-     catest_env.AppendUnique(LIBS = ['tinydtls'])
32
- 
33
---- a/resource/csdk/stack/samples/linux/SimpleClientServer/SConscript
34
-+++ b/resource/csdk/stack/samples/linux/SimpleClientServer/SConscript
35
-@@ -41,7 +41,7 @@ samples_env.AppendUnique(LIBPATH = [env.
36
- if target_os in ['darwin', 'ios']:
37
- 	samples_env.PrependUnique(LIBS = ['m','octbstack', 'ocsrm', 'connectivity_abstraction','coap' ])
38
- elif target_os not in ['arduino']:
39
--	samples_env.PrependUnique(LIBS = ['m', 'octbstack', 'ocsrm', 'oc_logger', 'connectivity_abstraction', 'coap'])
40
-+	samples_env.PrependUnique(LIBS = ['m', 'octbstack', 'ocsrm', 'connectivity_abstraction', 'coap'])
41
- 	samples_env.AppendUnique(LIBS = ['rt'])
42
- 
43
- if env.get('SECURED') == '1':
44
---- a/resource/csdk/stack/samples/linux/secure/SConscript
45
-+++ b/resource/csdk/stack/samples/linux/secure/SConscript
46
-@@ -41,7 +41,7 @@ if target_os not in ['windows', 'winrt']
47
- 		samples_env.AppendUnique(LIBS = ['-lpthread'])
48
- 
49
- samples_env.AppendUnique(LIBPATH = [env.get('BUILD_DIR')])
50
--samples_env.PrependUnique(LIBS = ['octbstack', 'm', 'oc_logger', 'connectivity_abstraction', 'coap'])
51
-+samples_env.PrependUnique(LIBS = ['octbstack', 'm', 'connectivity_abstraction', 'coap'])
52
- if env.get('SECURED') == '1':
53
-     samples_env.AppendUnique(LIBS = ['tinydtls'])
54
- 

+ 0
- 37
net/iotivity/patches/067-csdk-libconnectivity_abstraction.so-add-missing-depe.patch 查看文件

@@ -1,37 +0,0 @@
1
-From 32e39b18fb4fd01408898a0ccba751f0033800c7 Mon Sep 17 00:00:00 2001
2
-From: Hauke Mehrtens <hauke@hauke-m.de>
3
-Date: Wed, 22 Jul 2015 23:05:19 +0200
4
-Subject: [PATCH] csdk: libconnectivity_abstraction.so: add missing depending
5
- library
6
-
7
-libconnectivity_abstractionso depends on libcoap.so and librt.so when
8
-build as shared lib, which is the case for the Tizen build. This patch
9
-adds these dependencies to the build.
10
-
11
-Without this the dynamic loader will not automatically load these
12
-libraries and it could result in unresolved dependencies at runtime.
13
-
14
-Change-Id: Ib972be2b766d7fbccac9b246ae6f11e6182af94c
15
-Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
16
-Reviewed-on: https://gerrit.iotivity.org/gerrit/1825
17
-Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
18
-Reviewed-by: Uze Choi <uzchoi@samsung.com>
19
-Tested-by: Uze Choi <uzchoi@samsung.com>
20
----
21
- resource/csdk/connectivity/src/SConscript |    5 +++++
22
- 1 file changed, 5 insertions(+)
23
-
24
---- a/resource/csdk/connectivity/src/SConscript
25
-+++ b/resource/csdk/connectivity/src/SConscript
26
-@@ -108,6 +108,11 @@ if 'BLE' in ca_transport:
27
- print "Include path is %s" % env.get('CPPPATH')
28
- print "Files path is %s" % env.get('CA_SRC')
29
- if ca_os in ['android', 'tizen']:
30
-+	env.AppendUnique(LIBS = ['coap'])
31
-+	if env.get('SECURED') == '1':
32
-+		env.AppendUnique(LIBS = ['tinydtls'])
33
-+	if ca_os != 'android':
34
-+		env.AppendUnique(LIBS = ['rt'])
35
- 	calib = env.SharedLibrary('connectivity_abstraction', env.get('CA_SRC'))
36
- else:
37
- 	calib = env.StaticLibrary('connectivity_abstraction', env.get('CA_SRC'))

+ 0
- 227
net/iotivity/patches/068-build-make-build-fail-if-unresolved-symbols-found.patch 查看文件

@@ -1,227 +0,0 @@
1
-From 2533c88e18de689dbb26cfd4d585b1a991533c76 Mon Sep 17 00:00:00 2001
2
-From: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
3
-Date: Tue, 21 Jul 2015 22:00:18 +0200
4
-Subject: [PATCH] build: make build fail if unresolved symbols found
5
-
6
-gcc links shared libs also when there are still some unresolved
7
-symbols, you have to specify it explicitly to make it fail in such
8
-cases. I think a compiler should fail in such cases otherwise
9
-someone will add some not intended dependencies or some existing
10
-dependencies are not getting declared.
11
-
12
-This patch makes gcc fail in such cases. I have only activated this for
13
-libs build in a Linux build and explicitly deactivates it for windows
14
-(does this even work at all?) This should be build tested with Android
15
-also.
16
-
17
-This was build tested for Linux and Android.
18
-
19
-This patch depends on some other patches I send which are fixing the
20
-problems I found with this change.
21
-
22
-Change-Id: I9ab79896ca2e86e9226cd9b39060a0763ef89694
23
-Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
24
-Reviewed-on: https://gerrit.iotivity.org/gerrit/1802
25
-Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
26
-Reviewed-by: Erich Keane <erich.keane@intel.com>
27
-Reviewed-by: Hun-je Yeon <hunje.yeon@samsung.com>
28
-Reviewed-by: Uze Choi <uzchoi@samsung.com>
29
----
30
- extlibs/expat/SConscript                           |    3 +++
31
- .../csdk/connectivity/samples/android/SConscript   |    1 +
32
- resource/csdk/connectivity/src/SConscript          |    3 +++
33
- resource/oc_logger/SConscript                      |    3 +++
34
- resource/src/SConscript                            |    3 +++
35
- service/notification-manager/SConscript            |    3 +++
36
- service/protocol-plugin/plugin-manager/SConscript  |    4 ++++
37
- .../plugin-manager/src/Android/jni/SConscript      |    1 +
38
- service/protocol-plugin/plugins/SConscript         |    3 +++
39
- .../plugins/mqtt-fan/lib/cpp/SConscript            |    3 +++
40
- .../resource-manipulation/src/common/SConscript    |    5 ++++-
41
- .../src/resourceContainer/SConscript               |    3 +++
42
- .../src/resourceContainer/unittests/SConscript     |    3 +++
43
- .../src/serverBuilder/SConscript                   |    3 +++
44
- service/soft-sensor-manager/SConscript             |    3 +++
45
- service/things-manager/SConscript                  |    3 +++
46
- service/things-manager/sdk/java/jni/SConscript     |    3 +++
47
- 17 files changed, 49 insertions(+), 1 deletion(-)
48
-
49
---- a/extlibs/expat/SConscript
50
-+++ b/extlibs/expat/SConscript
51
-@@ -35,6 +35,9 @@ if target_os not in ['windows', 'winrt']
52
- 			'-fexceptions', '-fno-common'])
53
- 	expat_env.AppendUnique(CPPDEFINES = ['HAVE_EXPAT_CONFIG_H'])
54
- 
55
-+if target_os not in ['darwin', 'ios', 'windows', 'winrt']:
56
-+	expat_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined'])
57
-+
58
- ######################################################################
59
- # Source files and Targets
60
- ######################################################################
61
---- a/resource/csdk/connectivity/src/SConscript
62
-+++ b/resource/csdk/connectivity/src/SConscript
63
-@@ -27,6 +27,9 @@ env.AppendUnique(CPPPATH = [ os.path.joi
64
- if ca_os not in ['arduino', 'windows', 'winrt']:
65
- 	env.AppendUnique(CPPDEFINES = ['WITH_POSIX'])
66
- 
67
-+if ca_os not in ['darwin', 'ios', 'windows', 'winrt']:
68
-+	env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined'])
69
-+
70
- if ca_os in ['darwin','ios']:
71
- 	env.AppendUnique(CPPDEFINES = ['_DARWIN_C_SOURCE'])
72
- 
73
---- a/resource/oc_logger/SConscript
74
-+++ b/resource/oc_logger/SConscript
75
-@@ -42,6 +42,9 @@ if target_os not in ['arduino', 'windows
76
- 	liboc_logger_env.AppendUnique(CFLAGS = ['-Wall', '-std=c99', '-fPIC'])
77
- 	liboc_logger_env.AppendUnique(CXXFLAGS = ['-Wall', '-std=c++0x', '-fPIC'])
78
- 
79
-+if target_os not in ['darwin', 'ios', 'windows', 'winrt']:
80
-+	liboc_logger_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined'])
81
-+
82
- ######################################################################
83
- # Source files and Targets
84
- ######################################################################
85
---- a/resource/src/SConscript
86
-+++ b/resource/src/SConscript
87
-@@ -51,6 +51,9 @@ if target_os == 'linux':
88
- if target_os not in ['windows', 'winrt']:
89
- 	oclib_env.AppendUnique(CXXFLAGS = ['-std=c++0x', '-Wall', '-fPIC'])
90
- 
91
-+if target_os not in ['darwin', 'ios', 'windows', 'winrt']:
92
-+	oclib_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined'])
93
-+
94
- if target_os == 'android':
95
- 	oclib_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
96
- 	oclib_env.AppendUnique(LIBS = ['boost_thread', 'gnustl_shared', 'log'])
97
---- a/service/notification-manager/SConscript
98
-+++ b/service/notification-manager/SConscript
99
-@@ -65,6 +65,9 @@ notimgr_env.PrependUnique(LIBS = [
100
- if target_os not in ['windows', 'winrt']:
101
- 	notimgr_env.AppendUnique(CXXFLAGS = ['-O2', '-g', '-Wall', '-fmessage-length=0', '-std=c++0x'])
102
- 
103
-+if target_os not in ['darwin', 'ios', 'windows', 'winrt']:
104
-+	notimgr_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined'])
105
-+
106
- if target_os == 'linux':
107
- 	notimgr_env.AppendUnique(LIBS = ['pthread'])
108
- 
109
---- a/service/protocol-plugin/plugin-manager/SConscript
110
-+++ b/service/protocol-plugin/plugin-manager/SConscript
111
-@@ -61,6 +61,10 @@ if target_os == 'android':
112
- pmimpl_env = plugin_manager_env.Clone()
113
- pmimpl_env.PrependUnique(CCFLAGS = ['-fPIC'])
114
- pmimpl_env.PrependUnique(LIBS = File(env.get('BUILD_DIR') + '/libcpluff.a'))
115
-+
116
-+if target_os not in ['darwin', 'ios', 'windows', 'winrt']:
117
-+	pmimpl_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined'])
118
-+
119
- pmimpl = pmimpl_env.SharedLibrary('pmimpl', pmimpl_src)
120
- 
121
- plugin_manager_env.InstallTarget([ppm, pmimpl], 'libppm')
122
---- a/service/protocol-plugin/plugin-manager/src/Android/jni/SConscript
123
-+++ b/service/protocol-plugin/plugin-manager/src/Android/jni/SConscript
124
-@@ -23,6 +23,7 @@ ppm_jni_env.PrependUnique(LIBS = ['pmimp
125
- ppm_jni_env.AppendUnique(CPPPATH = [ppm_sdk+'/src'])
126
- ppm_jni_env.AppendUnique(CPPPATH = [ppm_sdk+'/../lib/cpluff/libcpluff'])
127
- ppm_jni_env.AppendUnique(CPPPATH = [env.get('SRC_DIR')+'/extlibs/rapidxml'])
128
-+ppm_jni_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined'])
129
- 
130
- ######################################################################
131
- # Source files and Targets
132
---- a/service/protocol-plugin/plugins/SConscript
133
-+++ b/service/protocol-plugin/plugins/SConscript
134
-@@ -40,6 +40,9 @@ if target_os not in ['windows', 'winrt']
135
-     plugins_env.PrependUnique(CCFLAGS = ['-fPIC'])
136
-     plugins_env.AppendUnique(LINKFLAGS = ['-fPIC'])
137
- 
138
-+if target_os not in ['darwin', 'ios', 'windows', 'winrt']:
139
-+    plugins_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined'])
140
-+
141
-     if target_os not in ['arduino', 'android']:
142
-         plugins_env.AppendUnique(LIBS = ['pthread'])
143
- 
144
---- a/service/protocol-plugin/plugins/mqtt-fan/lib/cpp/SConscript
145
-+++ b/service/protocol-plugin/plugins/mqtt-fan/lib/cpp/SConscript
146
-@@ -16,6 +16,9 @@ mosquittopp_env.AppendUnique(CPPPATH = [
147
- if target_os not in ['windows', 'winrt']:
148
- 	mosquittopp_env.AppendUnique(CFLAGS = ['-Wall', '-ggdb', '-O2', '-fPIC'])
149
- 
150
-+if target_os not in ['darwin', 'ios', 'windows', 'winrt']:
151
-+	mosquittopp_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined'])
152
-+
153
- if target_os == 'linux':
154
- 	mosquittopp_env.AppendUnique(LIBS = ['pthread'])
155
- 
156
---- a/service/resource-encapsulation/src/resourceContainer/SConscript
157
-+++ b/service/resource-encapsulation/src/resourceContainer/SConscript
158
-@@ -88,6 +88,9 @@ if target_os not in ['windows', 'winrt']
159
-     if target_os != 'android':
160
-         resource_container_env.AppendUnique(CXXFLAGS = ['-pthread'])
161
- 
162
-+if target_os not in ['darwin', 'ios', 'windows', 'winrt']:
163
-+    resource_container_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined'])
164
-+
165
- if target_os == 'android':
166
-     resource_container_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
167
-     resource_container_env.PrependUnique(LIBS = ['gnustl_shared', 'compatibility', 'log'])
168
---- a/service/resource-encapsulation/src/resourceContainer/unittests/SConscript
169
-+++ b/service/resource-encapsulation/src/resourceContainer/unittests/SConscript
170
-@@ -144,6 +144,9 @@ if int(containerJavaSupport):
171
- test_bundle_env = container_gtest_env.Clone()
172
- test_bundle_env.AppendUnique(CCFLAGS = ['-fPIC'])
173
- 
174
-+if target_os not in ['darwin', 'ios', 'windows', 'winrt']:
175
-+    test_bundle_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined'])
176
-+
177
- TEST_BUNDLE_DIR = 'TestBundle/'
178
- test_bundle_env.AppendUnique(CPPPATH = [
179
- 		TEST_BUNDLE_DIR + 'include',
180
---- a/service/resource-encapsulation/src/serverBuilder/SConscript
181
-+++ b/service/resource-encapsulation/src/serverBuilder/SConscript
182
-@@ -54,6 +54,9 @@ if target_os not in ['windows', 'winrt']
183
-     if target_os != 'android':
184
-         server_builder_env.AppendUnique(CXXFLAGS = ['-pthread'])
185
- 
186
-+if target_os not in ['darwin', 'ios', 'windows', 'winrt']:
187
-+    server_builder_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined'])
188
-+
189
- if target_os == 'android':
190
-     server_builder_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
191
-     server_builder_env.PrependUnique(LIBS = ['gnustl_shared', 'compatibility', 'log'])
192
---- a/service/soft-sensor-manager/SConscript
193
-+++ b/service/soft-sensor-manager/SConscript
194
-@@ -45,6 +45,9 @@ if target_os not in ['windows', 'winrt']
195
- 		soft_sensor_manager_env.AppendUnique(LIBS = ['pthread'])
196
- 		soft_sensor_manager_env.AppendUnique(CXXFLAGS = ['-pthread'])
197
- 
198
-+if target_os not in ['darwin', 'ios', 'windows', 'winrt']:
199
-+	soft_sensor_manager_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined'])
200
-+
201
- if target_os == 'android':
202
- 	soft_sensor_manager_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
203
- 	soft_sensor_manager_env.AppendUnique(LIBS = ['gnustl_shared'])
204
---- a/service/things-manager/SConscript
205
-+++ b/service/things-manager/SConscript
206
-@@ -43,6 +43,9 @@ if target_os not in ['windows', 'winrt']
207
-         things_manager_env.AppendUnique(CXXFLAGS = ['-pthread'])
208
-         things_manager_env.AppendUnique(LIBS = ['pthread'])
209
- 
210
-+if target_os not in ['darwin', 'ios', 'windows', 'winrt']:
211
-+    things_manager_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined'])
212
-+
213
- if target_os == 'android':
214
-     things_manager_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])
215
-     things_manager_env.PrependUnique(LIBS = ['gnustl_shared'])
216
---- a/service/things-manager/sdk/java/jni/SConscript
217
-+++ b/service/things-manager/sdk/java/jni/SConscript
218
-@@ -27,6 +27,9 @@ tm_jni_env.AppendUnique(CPPPATH = [tm_sd
219
- tm_jni_env.AppendUnique(CPPPATH = [base_jni])
220
- tm_jni_env.AppendUnique(CPPPATH = ['tm/inc', 'jniutil/inc', extlibs+'/timer/'])
221
- 
222
-+if target_os not in ['darwin', 'ios', 'windows', 'winrt']:
223
-+    tm_jni_env.AppendUnique(LINKFLAGS = ['-Wl,--no-undefined'])
224
-+
225
- ######################################################################
226
- # Source files and Targets
227
- ######################################################################

+ 0
- 29
net/iotivity/patches/070-Avoid-Segv-by-testing-address-field-before-using-it.patch 查看文件

@@ -1,29 +0,0 @@
1
-From a8f5ed3ff337bce5222967fdf8c0b475fd28e74a Mon Sep 17 00:00:00 2001
2
-From: John Light <john.j.light@intel.com>
3
-Date: Thu, 30 Jul 2015 15:14:07 -0700
4
-Subject: [PATCH] Avoid Segv by testing address field before using it.
5
-
6
-sIssue reported off dev list by Gabriel Schulhof.
7
-
8
-Change-Id: Ifa529da59fb784fd5cdef6ca333635cf99ed1f59
9
-Signed-off-by: John Light <john.j.light@intel.com>
10
-Reviewed-on: https://gerrit.iotivity.org/gerrit/2160
11
-Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
12
-Reviewed-by: Erich Keane <erich.keane@intel.com>
13
----
14
- .../src/ip_adapter/linux/caipnwmonitor.c           |    4 ++++
15
- 1 file changed, 4 insertions(+)
16
-
17
---- a/resource/csdk/connectivity/src/ip_adapter/linux/caipnwmonitor.c
18
-+++ b/resource/csdk/connectivity/src/ip_adapter/linux/caipnwmonitor.c
19
-@@ -57,6 +57,10 @@ u_arraylist_t *CAIPGetInterfaceInformati
20
-     struct ifaddrs *ifa = NULL;
21
-     for (ifa = ifp; ifa; ifa = ifa->ifa_next)
22
-     {
23
-+        if (!ifa->ifa_addr)
24
-+        {
25
-+            continue;
26
-+        }
27
-         int family = ifa->ifa_addr->sa_family;
28
-         if ((ifa->ifa_flags & IFF_LOOPBACK) || (AF_INET != family && AF_INET6 != family))
29
-         {

+ 0
- 29
net/iotivity/patches/090-resource-encapsulation-fix-build-without-curl.patch 查看文件

@@ -1,29 +0,0 @@
1
-From e767f892e7736008b60f85d2c2690d660661814b Mon Sep 17 00:00:00 2001
2
-From: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
3
-Date: Thu, 13 Aug 2015 15:03:11 +0200
4
-Subject: [PATCH] resource-encapsulation: fix build without curl
5
-
6
-The hue plugin needs curl and it should only be build when libcurl is available.
7
-Without this patch, the build fails without curl installed, this patch fixes the problem and makes the build worm without curl and without the hue stuff.
8
-
9
-Without this patch I am getting this error message:
10
-scons: ***
11
-File "/service/third_party_libs.scons", line 50, in ?
12
-
13
-Change-Id: I5b4da555ff84b9b605cc6c119990d60ff670bd0d
14
-Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
15
----
16
- .../src/resourceContainer/SConscript               |    2 +-
17
- 1 file changed, 1 insertion(+), 1 deletion(-)
18
-
19
---- a/service/resource-encapsulation/src/resourceContainer/SConscript
20
-+++ b/service/resource-encapsulation/src/resourceContainer/SConscript
21
-@@ -177,7 +177,7 @@ else:
22
- 	
23
- 	HueBundle = hue_resource_bundle_env.SharedLibrary('HueBundle', hue_resource_bundle_src)
24
- 	hue_resource_bundle_env.InstallTarget(HueBundle, 'libHueBundle')
25
--	lib_env = conf2.Finish()
26
-+lib_env = conf2.Finish()
27
- 
28
- ######################################################################
29
- # build resource container unit tests

+ 20
- 9
net/iotivity/patches/140-remove-glib2.patch 查看文件

@@ -1,22 +1,33 @@
1
+--- a/resource/csdk/connectivity/src/bt_le_adapter/linux/SConscript
2
++++ b/resource/csdk/connectivity/src/bt_le_adapter/linux/SConscript
3
+@@ -31,7 +31,7 @@ this_build_dir = os.path.join(root_build
4
+ 
5
+ # The Linux BLE adapter implementation uses GDBus to make D-Bus based
6
+ # method calls to BlueZ.  Pull in the necessary dependencies.
7
+-env.ParseConfig("pkg-config gio-unix-2.0 --cflags --libs")
8
++# env.ParseConfig("pkg-config gio-unix-2.0 --cflags --libs")
9
+ 
10
+ # Set up commands to generate GDBus code from the D-Bus introspection
11
+ # XML.
1 12
 --- a/resource/csdk/security/provisioning/sample/SConscript
2 13
 +++ b/resource/csdk/security/provisioning/sample/SConscript
3
-@@ -53,7 +53,7 @@ provisioning_env.PrependUnique(LIBS = ['
4
- 
5
- if env.get('SECURED') == '1':
6
-     provisioning_env.AppendUnique(LIBS = ['tinydtls'])
14
+@@ -58,7 +58,7 @@ if env.get('SECURED') == '1':
15
+ if env.get('DTLS_WITH_X509') == '1':
16
+ 	provisioning_env.AppendUnique(LIBS = ['CKManager'])
17
+ 	provisioning_env.AppendUnique(LIBS = ['asn1'])
7 18
 -provisioning_env.ParseConfig('pkg-config --libs glib-2.0');
8
-+#provisioning_env.ParseConfig('pkg-config --libs glib-2.0');
19
++# provisioning_env.ParseConfig('pkg-config --libs glib-2.0');
9 20
  
10 21
  provisioning_env.AppendUnique(CPPDEFINES = ['TB_LOG'])
11 22
  
12 23
 --- a/resource/csdk/security/provisioning/SConscript
13 24
 +++ b/resource/csdk/security/provisioning/SConscript
14
-@@ -62,7 +62,7 @@ provisioning_env.PrependUnique(LIBS = ['
15
- 
16
- provisioning_env.AppendUnique(LIBS = ['tinydtls'])
25
+@@ -73,7 +73,7 @@ provisioning_env.AppendUnique(LIBS = ['t
26
+ if env.get('DTLS_WITH_X509') == '1':
27
+ 	provisioning_env.AppendUnique(LIBS = ['CKManger'])
17 28
  
18 29
 -provisioning_env.ParseConfig('pkg-config --libs glib-2.0');
19
-+#provisioning_env.ParseConfig('pkg-config --libs glib-2.0');
30
++# provisioning_env.ParseConfig('pkg-config --libs glib-2.0');
20 31
  
21 32
  if target_os == 'android':
22 33
  	provisioning_env.AppendUnique(CXXFLAGS = ['-frtti', '-fexceptions'])