+}
+
+#
+# Patch the bad copies of the sys/types.h file
+#
+patch_include () {
+ echo -n "Ensuring that sys/types.h includes sys/bitypes.h"
+ fgrep "<sys/bitypes.h>" /usr/include/sys/types.h >/dev/null
+ if [ ! "$?" = "0" ]; then
+ echo -n '.'
+ rm -f /usr/include/sys/types.h.rej
+ (cd /usr/include/sys; patch -p0 -f -F30 -s) <patch-include
+ if [ ! "$?" = "0" ]; then
+ touch /usr/include/sys/types.h.rej
+ fi
+ if [ -f /usr/include/sys/types.h.rej ]; then
+ echo " --- FAILED!!!! You must fix this yourself!"
+ echo "The /usr/include/sys/types.h file must include the file"
+ echo "<sys/bitypes.h> after it includes the <linux/types.h> file."
+ echo -n "Please change it so that it does."
+ rm -f /usr/include/sys/types.h.rej
+ else
+ echo -n " -- completed"
+ fi
+ else
+ echo -n " -- skipping"
+ fi
+ echo ""
+}
+
+#
+# Check for the root user
+test_root() {
+ my_uid=`id -u`
+ my_name=`id -u -n`
+ if [ $my_uid -ne 0 ]; then
+ echo
+ echo "********************************************************************"
+ echo "Hello, $my_name. Since you are not running as the root user, it"
+ echo "is possible that this script will fail to install the needed files."
+ echo "If this happens then please use the root account and re-execute the"
+ echo "'make kernel' command. (This script is paused for 10 seconds.)"
+ echo "********************************************************************"
+ echo
+ sleep 10s