[rdkb][common][app][Fix ccsp-dhcp-mgr build fail in 64 bits]

[Description]
Fix ccsp-dhcp-mgr build fail in 64 bits

[Release-log]

Change-Id: Ibf2810f9178922675d7f2d2f40f78c4db1ea8c2a
diff --git a/recipes-ccsp/ccsp/ccsp-dhcp-mgr.bbappend b/recipes-ccsp/ccsp/ccsp-dhcp-mgr.bbappend
index 890cb5b..810b9c6 100644
--- a/recipes-ccsp/ccsp/ccsp-dhcp-mgr.bbappend
+++ b/recipes-ccsp/ccsp/ccsp-dhcp-mgr.bbappend
@@ -1,3 +1,19 @@
 require ccsp_common_filogic.inc
 
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI_append = " \
+    file://fix-64bit-build-issue.patch;apply=no \
+"
+
+do_filogic_patches() {
+    cd ${S}
+    if [ ! -e patch_applied ]; then
+        patch  -p1 < ${WORKDIR}/fix-64bit-build-issue.patch
+        touch patch_applied
+    fi
+}
+
+addtask filogic_patches after do_unpack before do_configure
+
 EXTRA_OECONF_append  = " --with-ccsp-arch=arm"
\ No newline at end of file
diff --git a/recipes-ccsp/ccsp/ccsp-dhcp-mgr/fix-64bit-build-issue.patch b/recipes-ccsp/ccsp/ccsp-dhcp-mgr/fix-64bit-build-issue.patch
new file mode 100644
index 0000000..45e22e7
--- /dev/null
+++ b/recipes-ccsp/ccsp/ccsp-dhcp-mgr/fix-64bit-build-issue.patch
@@ -0,0 +1,24 @@
+diff --git a/source/DHCPClientUtils/DHCPv4Client/dhcp_client_common.c b/source/DHCPClientUtils/DHCPv4Client/dhcp_client_common.c
+index ee2778e..f389bcd 100644
+--- a/source/DHCPClientUtils/DHCPv4Client/dhcp_client_common.c
++++ b/source/DHCPClientUtils/DHCPv4Client/dhcp_client_common.c
+@@ -220,7 +220,7 @@ static int check_proc_entry_for_pid (char * name, char * args)
+         if ((dent->d_type == DT_DIR) &&
+                 (SUCCESS == strtol64(dent->d_name, NULL, 10, &pid)))
+         {
+-            snprintf(filename, sizeof(filename), "/proc/%lld/stat", pid);
++            snprintf(filename, sizeof(filename), "/proc/%lld/stat", (long long int) pid);
+             fp = fopen(filename, "r");
+             if (fp == NULL)
+             {
+@@ -247,8 +247,8 @@ static int check_proc_entry_for_pid (char * name, char * args)
+                     if (args != NULL)
+                     {
+                         // argument to be verified before returning pid
+-                        DBG_PRINT("%s %d: %s running in pid %lld.. checking for cmdline param %s\n", __FUNCTION__, __LINE__, name, pid, args);
+-                        snprintf(filename, sizeof(filename), "/proc/%lld/cmdline", pid);
++                        DBG_PRINT("%s %d: %s running in pid %lld.. checking for cmdline param %s\n", __FUNCTION__, __LINE__, name, (long long int) pid, args);
++                        snprintf(filename, sizeof(filename), "/proc/%lld/cmdline", (long long int) pid);
+                         fp = fopen(filename, "r");
+                         if (fp == NULL)
+                         {