Root/target/linux/generic/patches-3.6/084-perf_mkstemp_build_fix.patch

1From 7b45f21c2e42f265f6fd469e43857e98e2fdf01c Mon Sep 17 00:00:00 2001
2From: Irina Tirdea <irina.tirdea@intel.com>
3Date: Sat, 8 Sep 2012 03:43:21 +0300
4Subject: [PATCH] perf tools: replace mkostemp with mkstemp
5
6The mkostemp function is only available in glibc. This leads to compile
7error in Android, since bionic is derived from BSD.
8
9Replacing mkostemp with mkstemp. mkstemp is available on both glibc and
10bionic.
11
12Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
13Cc: David Ahern <dsahern@gmail.com>
14Cc: Ingo Molnar <mingo@redhat.com>
15Cc: Namhyung Kim <namhyung.kim@lge.com>
16Cc: Paul Mackerras <paulus@samba.org>
17Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
18Cc: Steven Rostedt <rostedt@goodmis.org>
19Link: http://lkml.kernel.org/r/1347065004-15306-10-git-send-email-irina.tirdea@intel.com
20Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
21---
22 tools/perf/util/dso-test-data.c | 2 +-
23 1 file changed, 1 insertion(+), 1 deletion(-)
24
25--- a/tools/perf/util/dso-test-data.c
26+++ b/tools/perf/util/dso-test-data.c
27@@ -23,7 +23,7 @@ static char *test_file(int size)
28     int fd, i;
29     unsigned char *buf;
30 
31- fd = mkostemp(templ, O_CREAT|O_WRONLY|O_TRUNC);
32+ fd = mkstemp(templ);
33 
34     buf = malloc(size);
35     if (!buf) {
36

Archive Download this file



interactive