On Mon, Feb 10, 2014 at 12:25:19AM -0500, Sam Nelson wrote: > - Bug fix patch for handling non-standard net mask > ( netmask not % 8)
Ok, so I can understand the patch need. > - Add symbolic links for netlink & libraries But why do you need those symlinks? > Signed-off-by: Sam Nelson <[email protected]> > --- > .../libnl/files/fix_for_masking_addr.patch | 40 > ++++++++++++++++++++ > .../libnl/libnl_3.2.21.bbappend | 16 ++++++++ > 2 files changed, 56 insertions(+) > create mode 100755 > meta-arago-distro/recipes-connectivity/libnl/files/fix_for_masking_addr.patch > create mode 100755 > meta-arago-distro/recipes-connectivity/libnl/libnl_3.2.21.bbappend Permissions are all wrong. Those files should not be executable - that's the result of editing files in Windows... > diff --git > a/meta-arago-distro/recipes-connectivity/libnl/files/fix_for_masking_addr.patch > > b/meta-arago-distro/recipes-connectivity/libnl/files/fix_for_masking_addr.patch > new file mode 100755 > index 0000000..1c139a2 > --- /dev/null > +++ > b/meta-arago-distro/recipes-connectivity/libnl/files/fix_for_masking_addr.patch > @@ -0,0 +1,40 @@ > +From a8e7c2270ef4dea85bb2f4f83951e240cc636417 Mon Sep 17 00:00:00 2001 > +From: Jingting Zhou <a0221004@ares-ubuntu> > +Date: Fri, 11 Jan 2013 16:03:30 -0500 > +Subject: [PATCH] fix for addr masking > + > +--- > + lib/addr.c | 13 +++++++++---- > + 1 file changed, 9 insertions(+), 4 deletions(-) > + mode change 100644 => 100755 lib/addr.c > + > +diff --git a/lib/addr.c b/lib/addr.c > +old mode 100644 > +new mode 100755 And even the source file gets the permissions changed. > +index 3acd9e4..1d1c6c7 > +--- a/lib/addr.c > ++++ b/lib/addr.c > +@@ -526,11 +526,16 @@ int nl_addr_cmp_prefix(struct nl_addr *a, struct > nl_addr *b) > + > + d = memcmp(a->a_addr, b->a_addr, bytes); > + if (d == 0) { > +- int mask = (1UL << (len % 8)) - 1UL; > ++ if ((len % 8) != 0) > ++ { > ++ > ++ int mask = (0xFFFFFFFF << (8 - (len % 8))); > ++ > ++ d = (a->a_addr[bytes] & mask) - > ++ (b->a_addr[bytes] & mask); > ++ } > ++ } Looks like indentation is all over the place. Use the original indentation of the source file you are patching. In this case the original used tabs and the added lines use spaces... > + > +- d = (a->a_addr[bytes] & mask) - > +- (b->a_addr[bytes] & mask); > +- } > + } > + > + return d; > +-- > +1.7.9.5 > + > diff --git > a/meta-arago-distro/recipes-connectivity/libnl/libnl_3.2.21.bbappend > b/meta-arago-distro/recipes-connectivity/libnl/libnl_3.2.21.bbappend > new file mode 100755 > index 0000000..4af3918 > --- /dev/null > +++ b/meta-arago-distro/recipes-connectivity/libnl/libnl_3.2.21.bbappend In oe-core, libnl lives in recipes-support, not recipes-connectivity. It's recommended to use the same location for bbappends. > @@ -0,0 +1,16 @@ > +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" > + > +SRC_URI += "\ > + file://fix_for_masking_addr.patch \ > +" > + > +do_install_append() { > + cd ${D}${includedir} > + ln -sf libnl3/netlink netlink > + cd ${D}${libdir} > + ln -sf libnl-3.so.200 libnl.so > + ln -sf libnl-3.so.200 libnl.so.3 > + ln -sf libnl-genl-3.so.200 libnl-genl.so > + ln -sf libnl-genl-3.so.200 libnl-genl.so.3 What is the reason for these links? > +} > + > -- > 1.7.9.5 > > _______________________________________________ > meta-arago mailing list > [email protected] > http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago _______________________________________________ meta-arago mailing list [email protected] http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
