From f9c7cf01058ca9bc42e6ffde181bb7ddd04ba998 Mon Sep 17 00:00:00 2001 From: jcs Date: Tue, 26 Feb 2002 01:19:08 +0000 Subject: [PATCH] fix segfault in setting preferences, reported by ex0dus-at-p3ngu1n.org also enables cdrom eject code sent to upstream author --- sysutils/gkrellm/patches/patch-src_fs_c | 57 +++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 sysutils/gkrellm/patches/patch-src_fs_c diff --git a/sysutils/gkrellm/patches/patch-src_fs_c b/sysutils/gkrellm/patches/patch-src_fs_c new file mode 100644 index 00000000000..707a0c3da4e --- /dev/null +++ b/sysutils/gkrellm/patches/patch-src_fs_c @@ -0,0 +1,57 @@ +$OpenBSD: patch-src_fs_c,v 1.1 2002/02/26 01:19:08 jcs Exp $ +--- src/fs.c.orig Tue Jan 1 15:08:17 2002 ++++ src/fs.c Mon Feb 25 15:35:17 2002 +@@ -167,7 +167,7 @@ + } + #endif + +-#if defined(__FreeBSD__) || defined(__NetBSD__) ++#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) + static void + eject_bsd_cdrom(gchar *device) + { +@@ -180,7 +180,7 @@ + close(d); + } + } +-#endif /* __FreeBSD__ || __NetBSD__ */ ++#endif /* __FreeBSD__ || __NetBSD__ || __OpenBSD__ */ + + + #if defined(__FreeBSD__) +@@ -200,7 +200,7 @@ + } + #endif + +-#if defined(__NetBSD__) ++#if defined(__NetBSD__) || defined(__OpenBSD__) + static void + set_eject_command(void) + { +@@ -215,7 +215,7 @@ + } + #endif + } +-#endif /* __NetBSD__ */ ++#endif /* __NetBSD__ || __OpenBSD__ */ + + + /* ----- Linux ------------------------------------------------------ */ +@@ -643,16 +643,12 @@ + { + uid = getuid(); /* only real root is allowed to mount/umount always */ + +-#if defined(__FreeBSD__) || defined(__NetBSD__) ++#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) + get_mountlist = get_bsd_mounts_list; + get_fsusage = get_statfs_fsusage; + get_fstab_list = get_etc_fstab_list; + eject_cdrom = eject_bsd_cdrom; + set_eject_command(); +-#elif defined(__OpenBSD__) +- get_mountlist = get_bsd_mounts_list; +- get_fsusage = get_statfs_fsusage; +- get_fstab_list = get_etc_fstab_list; + #elif defined(__linux__) + get_mountlist = get_linux_proc_mounts_list; + get_fsusage = get_statfs_fsusage;