kernel/3.6: backport an upstream build for perf with uClibc
[openwrt/svn-archive/archive.git] / target / linux / generic / patches-3.6 / 084-perf_mkstemp_build_fix.patch
1 From 7b45f21c2e42f265f6fd469e43857e98e2fdf01c Mon Sep 17 00:00:00 2001
2 From: Irina Tirdea <irina.tirdea@intel.com>
3 Date: Sat, 8 Sep 2012 03:43:21 +0300
4 Subject: [PATCH] perf tools: replace mkostemp with mkstemp
5
6 The mkostemp function is only available in glibc. This leads to compile
7 error in Android, since bionic is derived from BSD.
8
9 Replacing mkostemp with mkstemp. mkstemp is available on both glibc and
10 bionic.
11
12 Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
13 Cc: David Ahern <dsahern@gmail.com>
14 Cc: Ingo Molnar <mingo@redhat.com>
15 Cc: Namhyung Kim <namhyung.kim@lge.com>
16 Cc: Paul Mackerras <paulus@samba.org>
17 Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
18 Cc: Steven Rostedt <rostedt@goodmis.org>
19 Link: http://lkml.kernel.org/r/1347065004-15306-10-git-send-email-irina.tirdea@intel.com
20 Signed-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 diff --git a/tools/perf/util/dso-test-data.c b/tools/perf/util/dso-test-data.c
26 index 541cdc7..c6caede 100644
27 --- a/tools/perf/util/dso-test-data.c
28 +++ b/tools/perf/util/dso-test-data.c
29 @@ -23,7 +23,7 @@ static char *test_file(int size)
30 int fd, i;
31 unsigned char *buf;
32
33 - fd = mkostemp(templ, O_CREAT|O_WRONLY|O_TRUNC);
34 + fd = mkstemp(templ);
35
36 buf = malloc(size);
37 if (!buf) {
38 --
39 1.7.10.4
40