Index: boot/common/util-linux.xml
===================================================================
--- boot/common/util-linux.xml	(revision 466d06150517e397a4ac232084d455bef89f7a19)
+++ boot/common/util-linux.xml	(revision 5616325c9ba6c933d333b7a4f314518c3a7c494e)
@@ -38,4 +38,12 @@
     href="../../final-system/common/util-linux.xml"
     xpointer="xpointer(//*[@os='p4'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="../../final-system/common/util-linux.xml"
+    xpointer="xpointer(//*[@os='p5'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="../../final-system/common/util-linux.xml"
+    xpointer="xpointer(//*[@os='p6'])"/>
 
     <para os="ba">Util-linux does not use the freshly installed headers and
Index: boot/mips64/util-linux.xml
===================================================================
--- boot/mips64/util-linux.xml	(revision 466d06150517e397a4ac232084d455bef89f7a19)
+++ boot/mips64/util-linux.xml	(revision 5616325c9ba6c933d333b7a4f314518c3a7c494e)
@@ -40,10 +40,18 @@
 
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
-    href="../../final-system/mips64/util-linux.xml"
+    href="../common/util-linux.xml"
     xpointer="xpointer(//*[@os='p5'])"/>
 
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="../common/util-linux.xml"
+    xpointer="xpointer(//*[@os='p6'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
     href="../../final-system/mips64/util-linux.xml"
-    xpointer="xpointer(//*[@os='p6'])"/>
+    xpointer="xpointer(//*[@os='mp1'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="../../final-system/mips64/util-linux.xml"
+    xpointer="xpointer(//*[@os='mp2'])"/>
 
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
Index: boot/multilib/util-linux.xml
===================================================================
--- boot/multilib/util-linux.xml	(revision 466d06150517e397a4ac232084d455bef89f7a19)
+++ boot/multilib/util-linux.xml	(revision 5616325c9ba6c933d333b7a4f314518c3a7c494e)
@@ -38,4 +38,12 @@
     href="../common/util-linux.xml"
     xpointer="xpointer(//*[@os='p4'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="../common/util-linux.xml"
+    xpointer="xpointer(//*[@os='p5'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="../common/util-linux.xml"
+    xpointer="xpointer(//*[@os='p6'])"/>
 
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
Index: final-system/common/util-linux.xml
===================================================================
--- final-system/common/util-linux.xml	(revision 466d06150517e397a4ac232084d455bef89f7a19)
+++ final-system/common/util-linux.xml	(revision 5616325c9ba6c933d333b7a4f314518c3a7c494e)
@@ -51,4 +51,9 @@
 
 <screen os="p4"><userinput>patch -Np1 -i ../&util-linux-gcc4_fixes-patch;</userinput></screen>
+
+    <para os="p5">The following patch fixes swapon.c, it tries to find the variable R_OK, but
+    the header that has R_OK is not included:</para>
+
+<screen os="p6"><userinput>patch -Np1 -i ../&util-linux-missing_header-patch;</userinput></screen>
 
     <para os="a">Prepare Util-linux for compilation:</para>
Index: final-system/mips64/util-linux.xml
===================================================================
--- final-system/mips64/util-linux.xml	(revision 466d06150517e397a4ac232084d455bef89f7a19)
+++ final-system/mips64/util-linux.xml	(revision 5616325c9ba6c933d333b7a4f314518c3a7c494e)
@@ -42,8 +42,16 @@
     xpointer="xpointer(//*[@os='p4'])"/>
 
-    <para os="p5">Util-linux has a compilation error when built using 64bit
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="../common/util-linux.xml"
+    xpointer="xpointer(//*[@os='p5'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="../common/util-linux.xml"
+    xpointer="xpointer(//*[@os='p6'])"/>
+
+    <para os="mp1">Util-linux has a compilation error when built using 64bit
     and a MIPS processor. The follow patch addresses this error:</para>
 
-<screen os="p6"><userinput>patch -Np1 -i ../&util-linux-mips64-patch;</userinput></screen>
+<screen os="mp2"><userinput>patch -Np1 -i ../&util-linux-mips64-patch;</userinput></screen>
 
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
Index: final-system/multilib/util-linux.xml
===================================================================
--- final-system/multilib/util-linux.xml	(revision 466d06150517e397a4ac232084d455bef89f7a19)
+++ final-system/multilib/util-linux.xml	(revision 5616325c9ba6c933d333b7a4f314518c3a7c494e)
@@ -44,4 +44,12 @@
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
     href="../common/util-linux.xml"
+    xpointer="xpointer(//*[@os='p5'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="../common/util-linux.xml"
+    xpointer="xpointer(//*[@os='p6'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="../common/util-linux.xml"
     xpointer="xpointer(//*[@os='a'])"/>
 
Index: introduction/common/changelog.xml
===================================================================
--- introduction/common/changelog.xml	(revision 466d06150517e397a4ac232084d455bef89f7a19)
+++ introduction/common/changelog.xml	(revision 5616325c9ba6c933d333b7a4f314518c3a7c494e)
@@ -38,4 +38,14 @@
 
     <listitem>
+      <para>May 30, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[jim] - Added a patch to fix a missing declaration of R_OK
+                        in util-linux.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
       <para>May 29, 2006</para>
       <itemizedlist>
Index: materials/common/patches.xml
===================================================================
--- materials/common/patches.xml	(revision 466d06150517e397a4ac232084d455bef89f7a19)
+++ materials/common/patches.xml	(revision 5616325c9ba6c933d333b7a4f314518c3a7c494e)
@@ -261,4 +261,12 @@
 
     <varlistentry>
+      <term>Util-linux Missing Header Patch - <token>&util-linux-missing_header-patch-size;</token>:</term> <listitem>
+        <para>Download: <ulink
+        url="&patches-root;util-linux/&util-linux-missing_header-patch;"/></para>
+        <para>MD5 sum: <literal>&util-linux-missing_header-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
       <term>Vim Fixes Patch - <token>&vim-fixes-patch-size;</token>:</term>
       <listitem>
Index: patches.ent
===================================================================
--- patches.ent	(revision 466d06150517e397a4ac232084d455bef89f7a19)
+++ patches.ent	(revision 5616325c9ba6c933d333b7a4f314518c3a7c494e)
@@ -117,4 +117,8 @@
 <!ENTITY util-linux-gcc4_fixes-patch-size "1 KB">
 
+<!ENTITY util-linux-missing_header-patch "util-linux-&util-linux-version;-missing_header-1.patch">
+<!ENTITY util-linux-missing_header-patch-md5 "33ccc15d2e92caa6189b044f573fdcda">
+<!ENTITY util-linux-missing_header-patch-size "1 KB">
+
 <!ENTITY vim-fixes-patch "vim-&vim-version;-fixes-3.patch">
 <!ENTITY vim-fixes-patch-md5 "ed158ebfb653b797b642fbff175addea">
