Index: src/acpustatus.h
--- src/acpustatus.h.orig	2006-02-03 07:24:27 +0100
+++ src/acpustatus.h	2006-02-04 10:09:54 +0100
@@ -1,7 +1,7 @@
 #ifndef __CPUSTATUS_H
 #define __CPUSTATUS_H
 
-#if defined(linux) || defined(HAVE_KSTAT_H) || defined(HAVE_SYSCTL_CP_TIME)
+#if (defined(linux) || defined(HAVE_KSTAT_H) || defined(HAVE_SYSCTL_CP_TIME)) || defined (__FreeBSD__)
 
 #define IWM_USER   (0)
 #define IWM_NICE   (1)
@@ -14,6 +14,10 @@
 
 #include "ywindow.h"
 #include "ytimer.h"
+#ifdef __FreeBSD__
+#include <kvm.h>
+#include <nlist.h>
+#endif
 
 class CPUStatus: public YWindow, public YTimerListener {
 public:
@@ -35,6 +39,10 @@
     unsigned long last_cpu[IWM_STATES];
     YColor *color[IWM_STATES];
     YTimer *fUpdateTimer;
+#ifdef __FreeBSD__
+    struct nlist namelist[2];
+    kvm_t *kd;
+#endif
 };
 #else
 #undef CONFIG_APPLET_CPU_STATUS
Index: src/wmclient.h
--- src/wmclient.h.orig	2006-02-03 07:24:27 +0100
+++ src/wmclient.h	2006-02-04 10:09:54 +0100
@@ -6,6 +6,8 @@
 #include "ymenu.h"
 #include "MwmUtil.h"
 
+#include <X11/Xutil.h>
+
 class YFrameWindow;
 class WindowListItem;
 class YIcon;
Index: src/ylocale.cc
--- src/ylocale.cc.orig	2006-02-03 07:24:27 +0100
+++ src/ylocale.cc	2006-02-04 10:09:54 +0100
@@ -149,7 +149,8 @@
         return NULL;
 
     YUChar * uStr(new YUChar[lLen + 1]);
-    char * inbuf((char *) lStr), * outbuf((char *) uStr);
+    const char * inbuf((char *) lStr);
+    char * outbuf((char *) uStr);
     size_t inlen(lLen), outlen(4 * lLen);
 
     if (0 > (int) iconv(instance->toUnicode, const_cast<const char **>(&inbuf), &inlen, &outbuf, &outlen))
