1. Fix taskstats.m4 so it no longer punts out warnings.
2. Add ltp-swaponoff.m4 to properly detect when we're running an older kernel and need linux/swap.h (issue found by compiler team at Cisco).
3. Apply fixes according to 2. to testcases/kernel/syscalls/swap*/*.c.
4. Apply Cyril Hrubis's libcpu_set fix to the .in files and cpuset_lib Makefile and .c file.
5. Block off functionality in getdelays.c with proper preprocessor defines, as per issues after encountered after ltp-taskstats.m4 was fixed.
diff --git a/testcases/kernel/syscalls/swapoff/swapoff01.c b/testcases/kernel/syscalls/swapoff/swapoff01.c
index 71ec334..72e78ba 100644
--- a/testcases/kernel/syscalls/swapoff/swapoff01.c
+++ b/testcases/kernel/syscalls/swapoff/swapoff01.c
@@ -78,8 +78,14 @@
 #include "test.h"
 #include "usctest.h"
 #include <errno.h>
-#include <sys/swap.h>
 #include <stdlib.h>
+#include "config.h"
+#include <sys/swap.h>
+#if defined(HAVE_OLD_SWAPONOFF)
+#include <linux/swap.h>
+#elif ! defined(HAVE_NEW_SWAPONOFF)
+#error "Cannot determine what copy of swapon/swapoff you are using."
+#endif
 
 static void setup();
 static void cleanup();
diff --git a/testcases/kernel/syscalls/swapoff/swapoff02.c b/testcases/kernel/syscalls/swapoff/swapoff02.c
index fe6851e..db3c0ce 100644
--- a/testcases/kernel/syscalls/swapoff/swapoff02.c
+++ b/testcases/kernel/syscalls/swapoff/swapoff02.c
@@ -85,7 +85,13 @@
 #include "test.h"
 #include "usctest.h"
 #include <stdlib.h>
+#include "config.h"
 #include <sys/swap.h>
+#if defined(HAVE_OLD_SWAPONOFF)
+#include <linux/swap.h>
+#elif ! defined(HAVE_NEW_SWAPONOFF)
+#error "Cannot determine what copy of swapon/swapoff you are using."
+#endif
 
 static void setup();
 static void cleanup();
diff --git a/testcases/kernel/syscalls/swapon/swapon01.c b/testcases/kernel/syscalls/swapon/swapon01.c
index e0c5719..22eef85 100644
--- a/testcases/kernel/syscalls/swapon/swapon01.c
+++ b/testcases/kernel/syscalls/swapon/swapon01.c
@@ -74,11 +74,17 @@
  *****************************************************************************/
 
 #include <unistd.h>
+#include <errno.h>
+#include <stdlib.h>
 #include "test.h"
 #include "usctest.h"
-#include <errno.h>
+#include "config.h"
 #include <sys/swap.h>
-#include <stdlib.h>
+#if defined(HAVE_OLD_SWAPONOFF)
+#include <linux/swap.h>
+#elif ! defined(HAVE_NEW_SWAPONOFF)
+#error "Cannot determine what copy of swapon/swapoff you are using."
+#endif
 
 static void setup();
 static void cleanup();
diff --git a/testcases/kernel/syscalls/swapon/swapon02.c b/testcases/kernel/syscalls/swapon/swapon02.c
index 86fe7f9..3661342 100644
--- a/testcases/kernel/syscalls/swapon/swapon02.c
+++ b/testcases/kernel/syscalls/swapon/swapon02.c
@@ -89,10 +89,6 @@
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <sys/stat.h>
-#include <sys/swap.h>
-#ifdef OLDER_DISTRO_RELEASE
-#include <linux/swap.h>
-#endif
 #include <fcntl.h>
 #include <pwd.h>
 #include <string.h>
@@ -100,6 +96,13 @@
 #include <signal.h>
 #include "test.h"
 #include "usctest.h"
+#include "config.h"
+#include <sys/swap.h>
+#if defined(HAVE_OLD_SWAPONOFF)
+#include <linux/swap.h>
+#elif ! defined(HAVE_NEW_SWAPONOFF)
+#error "Cannot determine what copy of swapon/swapoff you are using."
+#endif
 
 #ifndef OLDER_DISTRO_RELEASE
 #define MAX_SWAPFILES 32
diff --git a/testcases/kernel/syscalls/swapon/swapon03.c b/testcases/kernel/syscalls/swapon/swapon03.c
index 46cd7d5..5fdda2f 100644
--- a/testcases/kernel/syscalls/swapon/swapon03.c
+++ b/testcases/kernel/syscalls/swapon/swapon03.c
@@ -64,10 +64,6 @@
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <sys/stat.h>
-#include <sys/swap.h>
-#ifdef OLDER_DISTRO_RELEASE
-#include <linux/swap.h>
-#endif
 #include <fcntl.h>
 #include <pwd.h>
 #include <string.h>
@@ -75,6 +71,13 @@
 #include <signal.h>
 #include "test.h"
 #include "usctest.h"
+#include "config.h"
+#include <sys/swap.h>
+#if defined(HAVE_OLD_SWAPONOFF)
+#include <linux/swap.h>
+#elif ! defined(HAVE_NEW_SWAPONOFF)
+#error "Cannot determine what copy of swapon/swapoff you are using."
+#endif
 
 /* This handle when we have MAX_SWAPFILES = 30 or 32 */
 #define TEST_MAX_SWAPFILES 30