Permalink
Browse files

Make mklibs-native buildable with GCC 4.7 or newer

mklibs needs this small patch in oerder for GCC 4.7 to be able to build it.
Details: http://lists.debian.org/debian-boot/2012/04/msg00057.html

This adds the patch and modifies the mklibs-native_0.1.33.bb recipe.
  • Loading branch information...
aperezdc committed Apr 20, 2012
1 parent dfc27fa commit 8c77cf90ae02a93cf898b49589c0153efdec80dd
@@ -0,0 +1,21 @@
+With GCC 4.7 or newer the package would fail to build with this error:
+
+ elf.cpp:68:5: error: '::close' has not been declared
+
+This adds the unistd.h header so the ::close() function is defined.
+
+Diff:
+http://lists.debian.org/debian-boot/2012/04/msg00057.html
+
+
+diff -Nru mklibs-0.1.33/src/mklibs-readelf/elf.cpp mklibs-0.1.33+nmu1/src/mklibs-readelf/elf.cpp
+--- mklibs-0.1.33/src/mklibs-readelf/elf.cpp 2011-01-18 00:41:29.000000000 +0000
++++ mklibs-0.1.33+nmu1/src/mklibs-readelf/elf.cpp 2012-04-05 00:15:09.000000000 +0000
+@@ -25,6 +25,7 @@
+ #include <fcntl.h>
+ #include <sys/mman.h>
+ #include <sys/stat.h>
++#include <unistd.h>
+
+ using namespace Elf;
+
@@ -10,6 +10,7 @@ PR = "r0"
SRC_URI = "http://ftp.de.debian.org/debian/pool/main/m/mklibs/${BPN}_${PV}.tar.gz \
file://ac_init_fix.patch\
file://fix_STT_GNU_IFUNC.patch\
+ file://include-unistd-h.patch \
"
SRC_URI[md5sum] = "a462d9b802164993d247c1193116d78b"

0 comments on commit 8c77cf9

Please sign in to comment.