Fix build warning of notification service. 49/15949/3
authorKIM JungYong <jyong2.kim@samsung.com>
Sun, 25 Dec 2016 23:44:49 +0000 (08:44 +0900)
committerUze Choi <uzchoi@samsung.com>
Fri, 30 Dec 2016 06:50:08 +0000 (06:50 +0000)
In this patch, implicit declaration of function is resloved.
and it is fixed that different environments were specified for target.

Change-Id: Icd6dabc2557da2acc24fc7141d3e8ce0481b80fe
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15933
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
(cherry picked from commit 99ac43a2b8a51dbc0b025c4d554c3b5899b7d932)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15949

service/notification/SConscript
service/notification/src/consumer/NSConsumerDiscovery.c

index d53608a..7855076 100755 (executable)
@@ -111,15 +111,17 @@ if target_os == 'android':
     notification_provider_env.AppendUnique(LINKFLAGS = ['-Wl,-soname,libnotification_provider.so'])
     notification_consumer_env.AppendUnique(LINKFLAGS = ['-Wl,-soname,libnotification_consumer.so'])
 
-notification_consumer_src = [
-    env.Glob('src/consumer/*.c'), env.Glob('src/common/*.c')]
-notification_consumer_env.UserInstallTargetHeader('include/NSConsumerInterface.h',\
-    'service/notification', 'NSConsumerInterface.h')
+notification_common_obj = notification_provider_env.SharedObject(env.Glob('src/common/*.c'))
 
 notification_provider_src = [
-    env.Glob('src/provider/*.c'), env.Glob('src/common/*.c')]
+    env.Glob('src/provider/*.c'), notification_common_obj]
+notification_consumer_src = [
+    env.Glob('src/consumer/*.c'), notification_common_obj]
+    
 notification_provider_env.UserInstallTargetHeader('include/NSProviderInterface.h',\
     'service/notification', 'NSProviderInterface.h')
+notification_consumer_env.UserInstallTargetHeader('include/NSConsumerInterface.h',\
+    'service/notification', 'NSConsumerInterface.h')
 
 consumersdk = notification_consumer_env.StaticLibrary('notification_consumer', notification_consumer_src)
 notification_consumer_env.InstallTarget(consumersdk, 'libnotification_consumer')
index ae1eb29..baed182 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <string.h>
 #include "NSCommon.h"
+#include "NSUtil.h"
 #include "NSConsumerCommon.h"
 #include "NSConstants.h"
 #include "ocpayload.h"