-#if HAVE_MACH_MACH_INIT_H
-# include <mach/mach_init.h>
-#endif
-#if HAVE_MACH_HOST_PRIV_H
-# include <mach/host_priv.h>
-#endif
-#if HAVE_MACH_MACH_ERROR_H
-# include <mach/mach_error.h>
-#endif
-#if HAVE_MACH_MACH_HOST_H
-# include <mach/mach_host.h>
-#endif
-#if HAVE_MACH_MACH_PORT_H
-# include <mach/mach_port.h>
-#endif
-#if HAVE_MACH_MACH_TYPES_H
-# include <mach/mach_types.h>
-#endif
-#if HAVE_MACH_MESSAGE_H
-# include <mach/message.h>
-#endif
-#if HAVE_MACH_PROCESSOR_SET_H
-# include <mach/processor_set.h>
-#endif
-#if HAVE_MACH_TASK_H
-# include <mach/task.h>
-#endif
-#if HAVE_MACH_THREAD_ACT_H
-# include <mach/thread_act.h>
-#endif
-#if HAVE_MACH_VM_REGION_H
-# include <mach/vm_region.h>
-#endif
-#if HAVE_MACH_VM_MAP_H
-# include <mach/vm_map.h>
-#endif
-#if HAVE_MACH_VM_PROT_H
-# include <mach/vm_prot.h>
-#endif
+#if HAVE_THREAD_INFO
+# if HAVE_MACH_MACH_INIT_H
+# include <mach/mach_init.h>
+# endif
+# if HAVE_MACH_HOST_PRIV_H
+# include <mach/host_priv.h>
+# endif
+# if HAVE_MACH_MACH_ERROR_H
+# include <mach/mach_error.h>
+# endif
+# if HAVE_MACH_MACH_HOST_H
+# include <mach/mach_host.h>
+# endif
+# if HAVE_MACH_MACH_PORT_H
+# include <mach/mach_port.h>
+# endif
+# if HAVE_MACH_MACH_TYPES_H
+# include <mach/mach_types.h>
+# endif
+# if HAVE_MACH_MESSAGE_H
+# include <mach/message.h>
+# endif
+# if HAVE_MACH_PROCESSOR_SET_H
+# include <mach/processor_set.h>
+# endif
+# if HAVE_MACH_TASK_H
+# include <mach/task.h>
+# endif
+# if HAVE_MACH_THREAD_ACT_H
+# include <mach/thread_act.h>
+# endif
+# if HAVE_MACH_VM_REGION_H
+# include <mach/vm_region.h>
+# endif
+# if HAVE_MACH_VM_MAP_H
+# include <mach/vm_map.h>
+# endif
+# if HAVE_MACH_VM_PROT_H
+# include <mach/vm_prot.h>
+# endif
+/* #endif HAVE_THREAD_INFO */
+
+#elif KERNEL_LINUX
+# if HAVE_LINUX_CONFIG_H
+# include <linux/config.h>
+# endif
+# ifndef CONFIG_HZ
+# define CONFIG_HZ 100
+# endif
+#endif /* KERNEL_LINUX */