new file mode 100644
@@ -0,0 +1,172 @@
+diff -urN util-linux-2.22/Makefile.am util-linux-2.22.mod/Makefile.am
+--- util-linux-2.22/Makefile.am 2012-08-15 02:06:34.000000000 +0200
++++ util-linux-2.22.mod/Makefile.am 2012-10-19 21:17:14.000000000 +0200
+@@ -78,15 +78,15 @@
+
+ include schedutils/Makemodule.am
+ include text-utils/Makemodule.am
+-include term-utils/Makemodule.am
+-include login-utils/Makemodule.am
++#include term-utils/Makemodule.am
++#include login-utils/Makemodule.am
+ include mount-deprecated/Makemodule.am
+-include sys-utils/Makemodule.am
+-include misc-utils/Makemodule.am
+-include disk-utils/Makemodule.am
+-include fdisks/Makemodule.am
++#include sys-utils/Makemodule.am
++#include misc-utils/Makemodule.am
++#include disk-utils/Makemodule.am
++#include fdisks/Makemodule.am
+
+-include tests/Makemodule.am
++#include tests/Makemodule.am
+
+ #
+ # Don't rely on configure.ac AC_CONFIG_FILES for install paths.
+diff -urN util-linux-2.22/Makefile.in util-linux-2.22.mod/Makefile.in
+--- util-linux-2.22/Makefile.in 2012-09-04 15:01:04.000000000 +0200
++++ util-linux-2.22.mod/Makefile.in 2012-10-19 20:46:01.000000000 +0200
+@@ -2661,7 +2661,6 @@
+ @BUILD_LIBUUID_TRUE@libuuid_la_LIBADD = $(SOCKET_LIBS)
+ @BUILD_LIBUUID_TRUE@libuuid_la_CFLAGS = -I$(ul_libuuid_incdir) -Ilibuuid/src
+ @BUILD_LIBUUID_TRUE@libuuid_la_LDFLAGS = \
+-@BUILD_LIBUUID_TRUE@ -Wl,--version-script=$(top_srcdir)/libuuid/src/uuid.sym \
+ @BUILD_LIBUUID_TRUE@ -version-info $(LIBUUID_VERSION_INFO)
+
+
+@@ -2762,7 +2761,6 @@
+ @BUILD_LIBBLKID_TRUE@ libblkid/src/blkid.h.in
+
+ @BUILD_LIBBLKID_TRUE@libblkid_la_LDFLAGS = \
+-@BUILD_LIBBLKID_TRUE@ -Wl,--version-script=$(top_srcdir)/libblkid/src/blkid.sym \
+ @BUILD_LIBBLKID_TRUE@ -version-info $(LIBBLKID_VERSION_INFO)
+
+ @BUILD_LIBBLKID_TESTS_TRUE@@BUILD_LIBBLKID_TRUE@blkid_tests_cflags = -DTEST_PROGRAM $(libblkid_la_CFLAGS)
+@@ -2868,7 +2866,6 @@
+ @BUILD_LIBMOUNT_TRUE@ libmount/src/libmount.h.in
+
+ @BUILD_LIBMOUNT_TRUE@libmount_la_LDFLAGS = \
+-@BUILD_LIBMOUNT_TRUE@ -Wl,--version-script=$(top_srcdir)/libmount/src/libmount.sym \
+ @BUILD_LIBMOUNT_TRUE@ -version-info $(LIBMOUNT_VERSION_INFO)
+
+ @BUILD_LIBMOUNT_TESTS_TRUE@@BUILD_LIBMOUNT_TRUE@libmount_tests_cflags = -DTEST_PROGRAM $(libmount_la_CFLAGS)
+diff -urN util-linux-2.22/include/strutils.h util-linux-2.22.mod/include/strutils.h
+--- util-linux-2.22/include/strutils.h 2012-07-26 16:24:32.000000000 +0200
++++ util-linux-2.22.mod/include/strutils.h 2012-10-19 20:39:23.000000000 +0200
+@@ -45,7 +45,9 @@
+ dest[n-1] = 0;
+ }
+
++#ifndef __APPLE__
+ extern void strmode(mode_t mode, char *str);
++#endif
+
+ /* Options for size_to_human_string() */
+ enum
+diff -urN util-linux-2.22/include/ttyutils.h util-linux-2.22.mod/include/ttyutils.h
+--- util-linux-2.22/include/ttyutils.h 2012-07-23 23:21:56.000000000 +0200
++++ util-linux-2.22.mod/include/ttyutils.h 2012-10-19 20:41:22.000000000 +0200
+@@ -29,10 +29,19 @@
+ * the same result as `stty sane cr0 pass8'
+ */
+ tp->c_iflag |= (BRKINT | ICRNL | IMAXBEL);
++#ifdef __APPLE__
++ tp->c_iflag &= ~(IGNBRK | INLCR | IGNCR | IXOFF | IXANY | ISTRIP);
++#else
+ tp->c_iflag &= ~(IGNBRK | INLCR | IGNCR | IXOFF | IUCLC | IXANY | ISTRIP);
++#endif
+ tp->c_oflag |= (OPOST | ONLCR | NL0 | CR0 | TAB0 | BS0 | VT0 | FF0);
+- tp->c_oflag &= ~(OLCUC | OCRNL | ONOCR | ONLRET | OFILL | \
++#ifdef __APPLE__
++ tp->c_oflag &= ~(OCRNL | ONOCR | ONLRET | OFILL | \
+ NLDLY|CRDLY|TABDLY|BSDLY|VTDLY|FFDLY);
++#else
++ tp->c_oflag &= ~(OLCUC | OCRNL | ONOCR | ONLRET | OFILL | \
++ NLDLY|CRDLY|TABDLY|BSDLY|VTDLY|FFDLY);
++#endif
+ tp->c_lflag |= (ISIG | ICANON | IEXTEN | ECHO|ECHOE|ECHOK|ECHOKE);
+ tp->c_lflag &= ~(ECHONL|ECHOCTL|ECHOPRT | NOFLSH | TOSTOP);
+
+diff -urN util-linux-2.22/lib/Makemodule.am util-linux-2.22.mod/lib/Makemodule.am
+--- util-linux-2.22/lib/Makemodule.am 2012-08-13 15:13:35.000000000 +0200
++++ util-linux-2.22.mod/lib/Makemodule.am 2012-10-19 20:39:23.000000000 +0200
+@@ -5,7 +5,6 @@
+ lib/at.c \
+ lib/blkdev.c \
+ lib/canonicalize.c \
+- lib/cpuset.c \
+ lib/crc32.c \
+ lib/env.c \
+ lib/fileutils.c \
+@@ -15,7 +14,6 @@
+ lib/mbsalign.c \
+ lib/md5.c \
+ lib/pager.c \
+- lib/path.c \
+ lib/procutils.c \
+ lib/randutils.c \
+ lib/setproctitle.c \
+@@ -51,6 +49,8 @@
+ if LINUX
+ if HAVE_CPU_SET_T
+ check_PROGRAMS += test_cpuset
++libcommon_la_SOURCES += lib/cpuset.c \
++ lib/patch.c
+ endif
+ check_PROGRAMS += \
+ test_sysfs \
+diff -urN util-linux-2.22/lib/strutils.c util-linux-2.22.mod/lib/strutils.c
+--- util-linux-2.22/lib/strutils.c 2012-07-26 16:26:17.000000000 +0200
++++ util-linux-2.22.mod/lib/strutils.c 2012-10-19 20:39:23.000000000 +0200
+@@ -325,6 +325,8 @@
+ errx(STRTOXX_EXIT_CODE, "%s: '%s'", errmesg, str);
+ }
+
++
++#ifndef __APPLE__
+ /*
+ * Converts stat->st_mode to ls(1)-like mode string. The size of "str" must
+ * be 10 bytes.
+@@ -364,6 +366,8 @@
+ str[10] = '\0';
+ }
+
++#endif
++
+ /*
+ * returns exponent (2^x=n) in range KiB..PiB
+ */
+diff -urN util-linux-2.22/libblkid/src/Makemodule.am util-linux-2.22.mod/libblkid/src/Makemodule.am
+--- util-linux-2.22/libblkid/src/Makemodule.am 2012-08-02 20:10:35.000000000 +0200
++++ util-linux-2.22.mod/libblkid/src/Makemodule.am 2012-10-19 20:48:45.000000000 +0200
+@@ -124,7 +124,6 @@
+ libblkid/src/blkid.h.in
+
+ libblkid_la_LDFLAGS = \
+- -Wl,--version-script=$(top_srcdir)/libblkid/src/blkid.sym \
+ -version-info $(LIBBLKID_VERSION_INFO)
+
+ EXTRA_DIST += \
+diff -urN util-linux-2.22/libmount/src/Makemodule.am util-linux-2.22.mod/libmount/src/Makemodule.am
+--- util-linux-2.22/libmount/src/Makemodule.am 2012-08-02 20:11:33.000000000 +0200
++++ util-linux-2.22.mod/libmount/src/Makemodule.am 2012-10-19 20:48:52.000000000 +0200
+@@ -43,7 +43,6 @@
+ libmount/src/libmount.h.in
+
+ libmount_la_LDFLAGS = \
+- -Wl,--version-script=$(top_srcdir)/libmount/src/libmount.sym \
+ -version-info $(LIBMOUNT_VERSION_INFO)
+
+ EXTRA_DIST += \
+diff -urN util-linux-2.22/libuuid/src/Makemodule.am util-linux-2.22.mod/libuuid/src/Makemodule.am
+--- util-linux-2.22/libuuid/src/Makemodule.am 2012-07-30 17:47:46.000000000 +0200
++++ util-linux-2.22.mod/libuuid/src/Makemodule.am 2012-10-19 20:48:29.000000000 +0200
+@@ -32,7 +32,6 @@
+ libuuid_la_CFLAGS = -I$(ul_libuuid_incdir) -Ilibuuid/src
+
+ libuuid_la_LDFLAGS = \
+- -Wl,--version-script=$(top_srcdir)/libuuid/src/uuid.sym \
+ -version-info $(LIBUUID_VERSION_INFO)
+
+ EXTRA_DIST += libuuid/src/uuid.sym
@@ -22,6 +22,8 @@ EXTRA_OECONF = "\
--disable-makeinstall-chown --disable-use-tty-group \
"
+EXTRA_OECONF:>TARGET_KERNEL_darwin = " --disable-schedutils --disable-agetty --disable-sulogin"
+
RECIPE_FLAGS += "ncurses"
EXTRA_OECONF += "${EXTRA_OECONF_NCURSES}"
EXTRA_OECONF_NCURSES = " --without-ncurses"
@@ -45,7 +47,6 @@ EXTRA_OECONF += "${EXTRA_OECONF_LARGEFILE}"
EXTRA_OECONF_LARGEFILE = " --disable-largefile"
EXTRA_OECONF_LARGEFILE:USE_largefile = " --enable-largefile"
-EXTRA_OEMAKE += "V=1"
# Grrrr... at least some versions of util-linux insists on having
# an sbin dir even though it is told to put everything in bin. At
@@ -6,6 +6,8 @@ inherit pkgconfig
require util-linux.inc
SRC_URI += "file://configure-install-dirs.patch"
+SRC_URI += "file://configure.patch"
+
EXTRA_OECONF += "usrbin_execdir=${bindir} usrsbin_execdir=${sbindir}"
autotools_configure () {
${CONFIGURE_SCRIPT} \