diff options
Diffstat (limited to 'x11/xorg-libs/patches/patch-cs')
-rw-r--r-- | x11/xorg-libs/patches/patch-cs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/x11/xorg-libs/patches/patch-cs b/x11/xorg-libs/patches/patch-cs new file mode 100644 index 00000000000..d95ff7c8f3a --- /dev/null +++ b/x11/xorg-libs/patches/patch-cs @@ -0,0 +1,24 @@ +$NetBSD: patch-cs,v 1.1.2.2 2006/09/16 10:27:05 salo Exp $ + +--- programs/xf86dga/dga.c.orig 2004-04-23 21:54:47.000000000 +0200 ++++ programs/xf86dga/dga.c +@@ -16,6 +16,7 @@ + #include <X11/Xmd.h> + #include <X11/extensions/xf86dga.h> + #include <ctype.h> ++#include <errno.h> + #include <stdio.h> + #include <stdlib.h> + #include <signal.h> +@@ -141,7 +142,10 @@ main(int argc, char *argv[]) + + #ifndef __UNIXOS2__ + /* Give up root privs */ +- setuid(getuid()); ++ if (setuid(getuid()) == -1) { ++ fprintf(stderr, "Unable to change uid: %s\n", strerror(errno)); ++ exit(2); ++ } + #endif + + XF86DGASetViewPort(dis, DefaultScreen(dis), 0, 0); |