diff -ur Proc-ProcessTable-0.45/os/Linux.c Proc-ProcessTable-0.45.t0m/os/Linux.c
--- Proc-ProcessTable-0.45/os/Linux.c 2008-09-08 16:10:41.000000000 +0100
+++ Proc-ProcessTable-0.45.t0m/os/Linux.c 2009-01-07 10:10:36.000000000 +0000
@@ -12,8 +12,10 @@
#include <sys/vfs.h> /* statfs */
/* glibc only goodness */
#include <obstack.h> /* glibc's handy obstacks */
+#ifdef PROCESSTABLE_THREAD
/* ptheads */
#include <pthread.h> /* pthead_once */
+#endif
#define obstack_chunk_alloc malloc
#define obstack_chunk_free free
@@ -23,8 +25,12 @@
/* NOTE: Before this was actually milliseconds even though it said microseconds, now it is correct. */
#define JIFFIES_TO_MICROSECONDS(x) (((x)*1e6)/system_hertz)
+#ifdef PROCESSTABLE_THREAD
/* some static values that won't change, */
static pthread_once_t globals_init = PTHREAD_ONCE_INIT;
+#else
+static bool globals_init = false;
+#endif
static long long boot_time;
static unsigned page_size;
@@ -155,8 +161,14 @@
if(statfs("/proc", &sfs) == -1)
return (char *) get_string(STR_ERR_PROC_STATFS);
- /* one time initlization of some values that won't change */
- pthread_once(&globals_init, init_static_vars);
+
+#ifdef PROCESSTABLE_THREAD
+ /* one time initlization of some values that won't change */
+ pthread_once(&globals_init, init_static_vars);
+#else
+ init_static_vars();
+ globals_init = true;
+#endif
return NULL;
}