mirror of
https://git.FreeBSD.org/ports.git
synced 2025-02-08 12:01:56 +00:00
339b8b7463
PR: ports/51065 Submitted by: KATO Tsuguru <tkato@prontomail.com>
45 lines
947 B
Plaintext
45 lines
947 B
Plaintext
--- src/acpustatus.h.orig Sun Mar 9 04:37:52 2003
|
|
+++ src/acpustatus.h Sun Apr 13 12:02:47 2003
|
|
@@ -1,19 +1,29 @@
|
|
#ifndef __CPUSTATUS_H
|
|
#define __CPUSTATUS_H
|
|
|
|
-#if defined(linux) || defined(HAVE_KSTAT_H)
|
|
+#if (defined(linux) || defined(HAVE_KSTAT_H)) || defined (__FreeBSD__)
|
|
|
|
#ifdef HAVE_KSTAT_H
|
|
#include <kstat.h>
|
|
#include <sys/sysinfo.h>
|
|
#endif /* have_kstat_h */
|
|
|
|
+#ifdef __FreeBSD__
|
|
+#include <kvm.h>
|
|
+#include <nlist.h>
|
|
+#endif
|
|
|
|
#define IWM_USER (0)
|
|
#define IWM_NICE (1)
|
|
#define IWM_SYS (2)
|
|
+#ifdef __FreeBSD__
|
|
+#define IWM_INTR (3)
|
|
+#define IWM_IDLE (4)
|
|
+#define IWM_STATES (5)
|
|
+#else
|
|
#define IWM_IDLE (3)
|
|
#define IWM_STATES (4)
|
|
+#endif
|
|
|
|
#include "ywindow.h"
|
|
#include "ytimer.h"
|
|
@@ -38,6 +48,10 @@
|
|
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
|