Index: Makefile
===================================================================
--- Makefile	(revision 10de84286f36c6e4f3f92d59c073639668ffe9a1)
+++ Makefile	(revision e8d3c6f55fdb9a5a1e2e4d95612cb04c4ea82652)
@@ -93,4 +93,11 @@
 endif
 
+# `sed` pulls a list of "compatibility-only" error codes from `errno.in`,
+# the following grep finds instances of those error codes in HelenOS code.
+check_errno:
+	@ ! cat abi/include/abi/errno.in | \
+	sed -n -e '1,/COMPAT_START/d' -e 's/__errno_entry(\([A-Z0-9]\+\).*/\\b\1\\b/p' | \
+	git grep -n -f - -- ':(exclude)abi' ':(exclude)uspace/lib/posix'
+
 # Autotool (detects compiler features)
 
