hal: Branch 'master'
Danny Kukawka
dkukawka at kemper.freedesktop.org
Fri Mar 14 05:32:13 PDT 2008
hald/linux/addons/addon-dell-backlight.cpp | 5 ++++-
hald/linux/addons/addon-imac-backlight.c | 8 ++++++--
hald/linux/addons/addon-macbook-backlight.c | 11 ++++++++---
hald/linux/addons/addon-macbookpro-backlight.c | 5 ++++-
hald/linux/addons/addon-omap-backlight.c | 5 ++++-
5 files changed, 26 insertions(+), 8 deletions(-)
New commits:
commit 8a6d7392d7a103ff498d3c9ccbbe81f71aaea854
Author: Danny Kukawka <danny.kukawka at web.de>
Date: Fri Mar 14 13:32:07 2008 +0100
fixed several addons to build correctly
Fixed several issues in the linux addons:
- include config.h if you use e.g. HAVE_POLKIT
- addon-imac-backlight.c: added missing include of string.h, made
'LibHalContext *halctx' global static to allow usage in functions.
- addon-macbook-backlight.c: made 'LibHalContext *halctx' global
static to allow usage in functions
diff --git a/hald/linux/addons/addon-dell-backlight.cpp b/hald/linux/addons/addon-dell-backlight.cpp
index b5aac6a..f6ee582 100644
--- a/hald/linux/addons/addon-dell-backlight.cpp
+++ b/hald/linux/addons/addon-dell-backlight.cpp
@@ -23,7 +23,10 @@
*
**************************************************************************/
-#include <config.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include <string.h>
#include <glib/gmain.h>
diff --git a/hald/linux/addons/addon-imac-backlight.c b/hald/linux/addons/addon-imac-backlight.c
index 46cac6d..549e53d 100644
--- a/hald/linux/addons/addon-imac-backlight.c
+++ b/hald/linux/addons/addon-imac-backlight.c
@@ -20,8 +20,11 @@
*
*/
-#include <config.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/io.h>
@@ -33,6 +36,8 @@
#include "libhal/libhal.h"
#include "../../logger.h"
+static LibHalContext *halctx = NULL;
+
static void
backlight_set(int value)
{
@@ -172,7 +177,6 @@ filter_function (DBusConnection * connection, DBusMessage * message, void *userd
int
main (int argc, char **argv)
{
- LibHalContext *halctx;
DBusConnection *conn;
GMainLoop *main_loop;
const char *udi;
diff --git a/hald/linux/addons/addon-macbook-backlight.c b/hald/linux/addons/addon-macbook-backlight.c
index f18ba05..99c3905 100644
--- a/hald/linux/addons/addon-macbook-backlight.c
+++ b/hald/linux/addons/addon-macbook-backlight.c
@@ -48,15 +48,20 @@
* of the backlight when it is enabled.
*/
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include <pci/pci.h>
#include <glib.h>
+#include <fcntl.h>
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#include <sys/mman.h>
-#include <fcntl.h>
#include <unistd.h>
-#include <stdlib.h>
#define DBUS_API_SUBJECT_TO_CHANGE
@@ -73,6 +78,7 @@
#define ACCESS_INDEX (ACCESS_OFFSET >> 2)
static unsigned int *register_page;
+static LibHalContext *halctx = NULL;
static unsigned long
determine_video_base_address (void)
@@ -296,7 +302,6 @@ filter_function (DBusConnection * connection, DBusMessage * message, void *userd
int
main (int argc, char **argv)
{
- LibHalContext *halctx;
DBusConnection *conn;
GMainLoop *main_loop;
const char *udi;
diff --git a/hald/linux/addons/addon-macbookpro-backlight.c b/hald/linux/addons/addon-macbookpro-backlight.c
index 534f4f9..ec7ea56 100644
--- a/hald/linux/addons/addon-macbookpro-backlight.c
+++ b/hald/linux/addons/addon-macbookpro-backlight.c
@@ -24,7 +24,10 @@
*
**************************************************************************/
-#include <config.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/hald/linux/addons/addon-omap-backlight.c b/hald/linux/addons/addon-omap-backlight.c
index bb56594..f9913f5 100644
--- a/hald/linux/addons/addon-omap-backlight.c
+++ b/hald/linux/addons/addon-omap-backlight.c
@@ -25,7 +25,10 @@
*
**************************************************************************/
-#include <config.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
More information about the hal-commit
mailing list