[PATCH] fix building of xrandr against uclibc

Ryan Hope rmh3093 at gmail.com
Tue Feb 24 10:24:56 PST 2009


Building xrandr fails on uclibc. Here is the error:

xrandr.c:192: error: 'clone' redeclared as different kind of symbol
/usr/include/bits/sched.h:75: error: previous declaration of 'clone' was here

The following patch fixes this issue:

diff --git a/xrandr.c b/xrandr.c
index e2a657f..e7c3d61 100644
--- a/xrandr.c
+++ b/xrandr.c
@@ -189,7 +189,7 @@ reflection_name (Rotation rotation)

 #if HAS_RANDR_1_2
 typedef enum _policy {
-    clone, extend
+    _clone, extend
 } policy_t;

 typedef enum _relation {
@@ -1622,7 +1622,7 @@ main (int argc, char **argv)
     int                ret = 0;
 #if HAS_RANDR_1_2
     output_t   *output = NULL;
-    policy_t   policy = clone;
+    policy_t   policy = _clone;
     Bool       setit_1_2 = False;
     Bool       query_1_2 = False;
     Bool       modeit = False;
@@ -1886,7 +1886,7 @@ main (int argc, char **argv)
            continue;
        }
        if (!strcmp ("--clone", argv[i])) {
-           policy = clone;
+           policy = _clone;
            setit_1_2 = True;
            continue;
        }


More information about the xorg-devel mailing list