compositor-drm: fix libbacklight build
authorPekka Paalanen <ppaalanen@gmail.com>
Fri, 2 Mar 2012 15:33:17 +0000 (17:33 +0200)
committerKristian Høgsberg <krh@bitplanet.net>
Mon, 5 Mar 2012 03:00:02 +0000 (22:00 -0500)
Bad inclusion of DRM headers, missing some system headers.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
src/libbacklight.c

index b2e19bf..37f4bcc 100644 (file)
 
 #define _GNU_SOURCE
 
-#include <libbacklight.h>
+#include "libbacklight.h"
 #include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
 #include <linux/types.h>
 #include <dirent.h>
-#include <drm/drm_mode.h>
+#include <drm.h>
 #include <fcntl.h>
 #include <malloc.h>
 #include <string.h>
 #include <errno.h>
 
-static const char *output_names[] = { "Unknown",
-                                      "VGA",
-                                      "DVI-I",
-                                      "DVI-D",
-                                      "DVI-A",
-                                      "Composite",
-                                      "SVIDEO",
-                                      "LVDS",
-                                      "Component",
-                                      "9-pin DIN",
-                                     "DisplayPort"
-                                      "HDMI Type A",
-                                      "HDMI Type B",
-                                      "TV",
-                                     "Embedded DisplayPort"
-};
-
 static long backlight_get(struct backlight *backlight, char *node)
 {
        char buffer[100];
@@ -169,7 +154,7 @@ struct backlight *backlight_init(struct udev_device *drm_device,
        enum backlight_type type = 0;
        char buffer[100];
        struct backlight *backlight;
-       int err, ret;
+       int ret;
 
        if (!drm_device)
                return NULL;