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

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

[Release-log]
N/A

Change-Id: I6849fd48272ea2d29175809246ab2acce42e14bd
diff --git a/recipes-ccsp/ccsp/ccsp-dhcp-mgr.bbappend b/recipes-ccsp/ccsp/ccsp-dhcp-mgr.bbappend
index 890cb5b..b327eb9 100644
--- a/recipes-ccsp/ccsp/ccsp-dhcp-mgr.bbappend
+++ b/recipes-ccsp/ccsp/ccsp-dhcp-mgr.bbappend
@@ -1,3 +1,17 @@
 require ccsp_common_filogic.inc
 
-EXTRA_OECONF_append  = " --with-ccsp-arch=arm"
\ No newline at end of file
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+EXTRA_OECONF_append  = " --with-ccsp-arch=arm"
+
+SRC_URI_append = " \
+	file://*.patch;apply=no \
+"
+
+do_fixcompile_patches() {
+	cd ${S}
+	if [ ! -e patch_applied ]; then
+		patch  -p1 < ${WORKDIR}/0001-fix-64bit-compile-error.patch
+	fi
+}
+addtask fixcompile_patches after do_unpack before do_configure
diff --git a/recipes-ccsp/ccsp/ccsp-dhcp-mgr/0001-fix-64bit-compile-error.patch b/recipes-ccsp/ccsp/ccsp-dhcp-mgr/0001-fix-64bit-compile-error.patch
new file mode 100644
index 0000000..02dd1e6
--- /dev/null
+++ b/recipes-ccsp/ccsp/ccsp-dhcp-mgr/0001-fix-64bit-compile-error.patch
@@ -0,0 +1,25 @@
+From d9b60abdfd42e3634dbd89dea6007941cf456282 Mon Sep 17 00:00:00 2001
+From: "Allen.Ye" <allen.ye@mediatek.com>
+Date: Mon, 4 Sep 2023 10:55:47 +0800
+Subject: [PATCH] fix 64bit compile error
+
+---
+ source/TR-181/board_sbapi/cosa_dhcpv6_apis.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/source/TR-181/board_sbapi/cosa_dhcpv6_apis.c b/source/TR-181/board_sbapi/cosa_dhcpv6_apis.c
+index f910130..f77f90e 100755
+--- a/source/TR-181/board_sbapi/cosa_dhcpv6_apis.c
++++ b/source/TR-181/board_sbapi/cosa_dhcpv6_apis.c
+@@ -9196,7 +9196,7 @@ dhcpv6c_dbg_thrd(void * in)
+                             if (strlen(globalIP2) != 0 )
+                             {
+                                 g_dhcpv6s_refresh_count = bRestartLan;
+-                                CcspTraceWarning(("%s: g_dhcpv6s_refresh_count %ld, globalIP2 is %s, strlen is %d\n", __func__, g_dhcpv6s_refresh_count,globalIP2,strlen(globalIP2)));
++                                CcspTraceWarning(("%s: g_dhcpv6s_refresh_count %ld, globalIP2 is %s, strlen is %ld\n", __func__, g_dhcpv6s_refresh_count,globalIP2,strlen(globalIP2)));
+                             }
+ 
+                             rc = strcpy_s(globalIP2, sizeof(globalIP2), globalIP);
+-- 
+2.18.0
+