summaryrefslogtreecommitdiff
path: root/src/lib/ecore_fb
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-01-08 22:06:41 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-01-08 22:06:41 +0900
commite8c13118eb39a3acaf70430951f7049c53799bae (patch)
tree3a91075c6e93f53c60cea3ebcb714575f0ce5b79 /src/lib/ecore_fb
parentb95ef3801f9719a8f8ff731e25d66a8d1dd417cd (diff)
fix mingw build for setuid fix/checks
Diffstat (limited to 'src/lib/ecore_fb')
-rw-r--r--src/lib/ecore_fb/ecore_fb.c6
-rw-r--r--src/lib/ecore_fb/ecore_fb_ts.c6
2 files changed, 10 insertions, 2 deletions
diff --git a/src/lib/ecore_fb/ecore_fb.c b/src/lib/ecore_fb/ecore_fb.c
index 3bce09de0b..85ad087d33 100644
--- a/src/lib/ecore_fb/ecore_fb.c
+++ b/src/lib/ecore_fb/ecore_fb.c
@@ -108,7 +108,11 @@ _ecore_fb_size_get(int *w, int *h)
108 struct fb_var_screeninfo fb_var; 108 struct fb_var_screeninfo fb_var;
109 int fb; 109 int fb;
110 110
111 if ((getuid() == getuid()) && (getenv("EVAS_FB_DEV"))) 111 if (
112#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
113 (getuid() == geteuid()) &&
114#endif
115 (getenv("EVAS_FB_DEV")))
112 fb = open(getenv("EVAS_FB_DEV"), O_RDWR); 116 fb = open(getenv("EVAS_FB_DEV"), O_RDWR);
113 else 117 else
114 { 118 {
diff --git a/src/lib/ecore_fb/ecore_fb_ts.c b/src/lib/ecore_fb/ecore_fb_ts.c
index 3f699c05c9..00a3f31530 100644
--- a/src/lib/ecore_fb/ecore_fb_ts.c
+++ b/src/lib/ecore_fb/ecore_fb_ts.c
@@ -81,7 +81,11 @@ ecore_fb_ts_init(void)
81{ 81{
82#ifdef HAVE_TSLIB 82#ifdef HAVE_TSLIB
83 char *tslib_tsdevice = NULL; 83 char *tslib_tsdevice = NULL;
84 if ((getuid() == getuid()) && ((tslib_tsdevice = getenv("TSLIB_TSDEVICE")))) 84 if (
85#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
86 (getuid() == geteuid()) &&
87#endif
88 ((tslib_tsdevice = getenv("TSLIB_TSDEVICE"))))
85 { 89 {
86 printf( "ECORE_FB: TSLIB_TSDEVICE = '%s'\n", tslib_tsdevice ); 90 printf( "ECORE_FB: TSLIB_TSDEVICE = '%s'\n", tslib_tsdevice );
87 _ecore_fb_tslib_tsdev = ts_open( tslib_tsdevice, 1 ); /* 1 = nonblocking, 0 = blocking */ 91 _ecore_fb_tslib_tsdev = ts_open( tslib_tsdevice, 1 ); /* 1 = nonblocking, 0 = blocking */