Index: uspace/app/binutils/intrusive.sh
===================================================================
--- uspace/app/binutils/intrusive.sh	(revision c3b653a397caeed8eb65668d6e5ada7309b45296)
+++ uspace/app/binutils/intrusive.sh	(revision 343d0da12de34cb0902da3cee68dc0503a367518)
@@ -85,4 +85,9 @@
 # from libposix are prefixed with the posix_ prefix.
 #
+# Patch 7
+# Implementation of fnmatch inside libiberty is not very friendly to the
+# non-GNU libc which implements its own native fnmatch. To resolve this 
+# incompatibility, libiberty fnmatch has to be manually hidden.
+#
 
 case "$1" in
@@ -95,4 +100,7 @@
 		cp -f "$2/ld/configure" "$2/ld/configure.backup"
 		cp -f "$2/libiberty/configure" "$2/libiberty/configure.backup"
+		cp -f "$2/libiberty/Makefile.in" "$2/libiberty/Makefile.in.backup"
+		cp -f "$2/include/fnmatch.h" "$2/include/fnmatch.h.backup"
+		cp -f "$2/libiberty/fnmatch.c" "$2/libiberty/fnmatch.c.backup"
 		cp -f "$2/libiberty/pex-common.h" "$2/libiberty/pex-common.h.backup"
 		cp -f "$2/libiberty/xstrerror.c" "$2/libiberty/xstrerror.c.backup"
@@ -139,4 +147,19 @@
 		sed 's/^cross_compiling=no/cross_compiling=yes/g' \
 		> "$2/libiberty/configure"
+
+		# Hide libiberty fnmatch implementation.
+		# See Patch 7.
+		mv -f "$2/include/fnmatch.h" "$2/include/fnmatch_hide.h"
+		(
+		# Avoid compiler warning for empty compilation unit.
+		echo 'char __fnmatch_hide(void);'
+		echo 'char __fnmatch_hide(void) { return 0; }'
+		echo '#define __GNU_LIBRARY__'
+		cat "$2/libiberty/fnmatch.c.backup"
+		) > "$2/libiberty/fnmatch.c"
+		mv -f "$2/libiberty/fnmatch.c" "$2/libiberty/fnmatch_hide.c"
+		cat "$2/libiberty/Makefile.in.backup" | \
+		sed 's/fnmatch/fnmatch_hide/g' \
+		> "$2/libiberty/Makefile.in"
 
 		# Patch libiberty pex-common.h.
@@ -170,4 +193,8 @@
 		mv -f "$2/ld/configure.backup" "$2/ld/configure"
 		mv -f "$2/libiberty/configure.backup" "$2/libiberty/configure"
+		mv -f "$2/libiberty/Makefile.in.backup" "$2/libiberty/Makefile.in"
+		rm -f "$2/include/fnmatch_hide.h" "$2/libiberty/fnmatch_hide.c"
+		mv -f "$2/include/fnmatch.h.backup" "$2/include/fnmatch.h"
+		mv -f "$2/libiberty/fnmatch.c.backup" "$2/libiberty/fnmatch.c"
 		mv -f "$2/libiberty/pex-common.h.backup" "$2/libiberty/pex-common.h"
 		mv -f "$2/libiberty/xstrerror.c.backup" "$2/libiberty/xstrerror.c"
