Make gnome-power-backlight-helper do nothing and return 0 as it requires

the linux-only sysfs(2).
This commit is contained in:
ajacoutot 2011-05-24 18:14:52 +00:00
parent bf35fb2c10
commit f1472f3af9
2 changed files with 26 additions and 2 deletions

View File

@ -1,10 +1,10 @@
# $OpenBSD: Makefile,v 1.3 2011/05/24 10:41:58 ajacoutot Exp $ # $OpenBSD: Makefile,v 1.4 2011/05/24 18:14:52 ajacoutot Exp $
COMMENT= GNOME power manager COMMENT= GNOME power manager
GNOME_PROJECT= gnome-power-manager GNOME_PROJECT= gnome-power-manager
GNOME_VERSION= 2.32.0 GNOME_VERSION= 2.32.0
REVISION= 1 REVISION= 2
HOMEPAGE= http://projects.gnome.org/gnome-power-manager/ HOMEPAGE= http://projects.gnome.org/gnome-power-manager/

View File

@ -0,0 +1,24 @@
$OpenBSD: patch-src_gpm-backlight-helper_c,v 1.1 2011/05/24 18:14:52 ajacoutot Exp $
XXX make gnome-power-backlight-helper do nothing and return 0.
--- src/gpm-backlight-helper.c.orig Fri Aug 6 15:50:47 2010
+++ src/gpm-backlight-helper.c Tue May 24 19:32:32 2011
@@ -141,6 +141,7 @@ out:
gint
main (gint argc, gchar *argv[])
{
+#ifndef __OpenBSD__
GOptionContext *context;
gint uid;
gint euid;
@@ -276,5 +277,9 @@ out:
g_free (filename_file);
g_free (contents);
return retval;
+#else
+ g_print ("This program does nothing on OpenBSD (no support for sysfs(2)).\n");
+ return 0;
+#endif
}