Blob Blame History Raw
From 74d39213b4cf89fdaa6f14913d0150852a1090f2 Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Tue, 24 Jan 2017 09:43:43 -0500
Subject: [PATCH] Remove call to LoaderGetOS

If you're not using Linux, this isn't likely to build let alone run. And
if it _does_ build on non-Linux, it's probably because someone went out
of their way to try to make it work.

Signed-off-by: Adam Jackson <ajax@redhat.com>
---
 src/v4l.c | 18 ++----------------
 1 file changed, 2 insertions(+), 16 deletions(-)

diff --git a/src/v4l.c b/src/v4l.c
index 10e782b..f4b2b4b 100644
--- a/src/v4l.c
+++ b/src/v4l.c
@@ -92,22 +92,8 @@ v4lSetup(pointer module, pointer opts, int *errmaj, int *errmin)
     }
 
     setupDone = TRUE;
-
-    /* Check that we're being loaded on a Linux system */
-    LoaderGetOS(&osname, NULL, NULL, NULL);
-    if (!osname || strcmp(osname, "linux") != 0) {
-        if (errmaj)
-            *errmaj = LDR_BADOS;
-        if (errmin)
-            *errmin = 0;
-        return NULL;
-    } else {
-        /* OK */
-
-        xf86AddDriver (&V4L, module, 0);
-
-        return (pointer)1;
-    }
+    xf86AddDriver (&V4L, module, 0);
+    return (pointer)1;
 }
 
 #else
-- 
2.17.1