summaryrefslogtreecommitdiff
path: root/sysutils/gnome-system-monitor/patches/patch-aa
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/gnome-system-monitor/patches/patch-aa')
-rw-r--r--sysutils/gnome-system-monitor/patches/patch-aa47
1 files changed, 47 insertions, 0 deletions
diff --git a/sysutils/gnome-system-monitor/patches/patch-aa b/sysutils/gnome-system-monitor/patches/patch-aa
new file mode 100644
index 00000000000..53daf448b79
--- /dev/null
+++ b/sysutils/gnome-system-monitor/patches/patch-aa
@@ -0,0 +1,47 @@
+$NetBSD: patch-aa,v 1.1 2007/11/05 19:09:08 drochner Exp $
+
+--- src/sysinfo.cpp.orig 2007-11-04 21:12:42.000000000 +0100
++++ src/sysinfo.cpp
+@@ -190,6 +190,26 @@ namespace {
+ }
+ };
+
++ class NetBSDSysInfo
++ : public SysInfo
++ {
++ public:
++ NetBSDSysInfo()
++ {
++ this->load_netbsd_info();
++ }
++
++ private:
++ void load_netbsd_info()
++ {
++ this->distro_name = "NetBSD";
++
++ std::ifstream input("/etc/release");
++
++ if (input)
++ std::getline(input, this->distro_release);
++ }
++ };
+
+ class LSBSysInfo
+ : public SysInfo
+@@ -256,10 +276,15 @@ namespace {
+ g_free(p);
+ return new LSBSysInfo;
+ }
++#ifdef __NetBSD__ /* might also have /etc/release */
++ else
++ return new NetBSDSysInfo;
++#else
+ else if (g_file_test("/etc/release", G_FILE_TEST_EXISTS))
+ return new SolarisSysInfo;
+
+ return new SysInfo;
++#endif
+ }
+ }
+