| 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 | --- 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 | |