summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/tslib/tslib/set-open-mode-for-ts_calibrate_c.patch
blob: 738ef9aad1e529bedd990245017dd0bc9e9c7840 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Get patch from: http://permalink.gmane.org/gmane.comp.lib.uclibc.buildroot/27614

Upstream-Status: Inappropriate [configuration]

diff --git a/tests/ts_calibrate.c b/tests/ts_calibrate.c
index 004517b..c0a9771 100644
--- a/tests/ts_calibrate.c
+++ b/tests/ts_calibrate.c
@@ -21,6 +21,7 @@
 #include <sys/ioctl.h>
 #include <sys/mman.h>
 #include <sys/time.h>
+#include <sys/stat.h>
 #include <linux/kd.h>
 #include <linux/vt.h>
 #include <linux/fb.h>
@@ -224,9 +225,11 @@ int main()
		for (i = 0; i < 7; i++) printf("%d ", cal.a [i]);
		printf("\n");
		if ((calfile = getenv("TSLIB_CALIBFILE")) != NULL) {
-			cal_fd = open (calfile, O_CREAT | O_RDWR);
+			cal_fd = open (calfile, O_CREAT | O_RDWR,
+			S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
		} else {
-			cal_fd = open ("/etc/pointercal", O_CREAT | O_RDWR);
+			cal_fd = open ("/etc/pointercal", O_CREAT | O_RDWR,
+			S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
		}
		sprintf (cal_buffer,"%d %d %d %d %d %d %d",
			 cal.a[1], cal.a[2], cal.a[0],