Patchwork libmbus: patch out bcopy to fix build breakage

login
register
mail settings
Submitter Gustavo Zacarias
Date May 3, 2012, 11:59 a.m.
Message ID <1336046343-15336-1-git-send-email-gustavo@zacarias.com.ar>
Download mbox | patch
Permalink /patch/156673/
State Accepted
Commit c95522860fec2fa66b1b9c69cbf703999ea4233b
Headers show

Comments

Gustavo Zacarias - May 3, 2012, 11:59 a.m.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/libmbus/libmbus-0.6.1-bcopy.patch |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
 create mode 100644 package/libmbus/libmbus-0.6.1-bcopy.patch
Peter Korsgaard - May 3, 2012, 8:04 p.m.
>>>>> "Gustavo" == Gustavo Zacarias <gustavo@zacarias.com.ar> writes:

 Gustavo> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>

Committed, thanks.

Patch

diff --git a/package/libmbus/libmbus-0.6.1-bcopy.patch b/package/libmbus/libmbus-0.6.1-bcopy.patch
new file mode 100644
index 0000000..8b8310c
--- /dev/null
+++ b/package/libmbus/libmbus-0.6.1-bcopy.patch
@@ -0,0 +1,15 @@ 
+Drop bcopy since it's deprecated.
+
+Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
+diff -Nura libmbus-0.6.1/mbus/mbus-tcp.c libmbus-0.6.1-bcopy/mbus/mbus-tcp.c
+--- libmbus-0.6.1/mbus/mbus-tcp.c	2011-11-06 02:34:28.000000000 -0300
++++ libmbus-0.6.1-bcopy/mbus/mbus-tcp.c	2012-05-03 08:11:39.680346347 -0300
+@@ -78,7 +78,7 @@
+         return NULL;
+     }
+ 
+-    bcopy((void *)(host_addr->h_addr), (void *)(&s_addr.sin_addr), host_addr->h_length);
++    memmove((void *)(&s_addr.sin_addr), (void *)(host_addr->h_addr), host_addr->h_length);
+ 
+     if (connect(handle->sock, (struct sockaddr *)&s_addr, sizeof(s_addr)) < 0)
+     {