ndk: Add missing declaration for mkdtemp

The mkdtemp() function has always been implemented in the C library
(see [1] for proof) but was missing a declaration in <stdlib.h>, until
Android 4.0.1 [2]

This patch simply adds the missing declaration to former <stdlib.h>
versions. This makes it easier to build certain open-source programs
for Android, because auto-tools probing typically looks at the symbols
in libc.so to define HAVE_MKDTEMP, then the source fails to compile
because of the lack of declaration.

Note that the mkdtemp is also already listed in
platforms/android-*/arch-*/symbols/libc.so.functions.txt, which were
generated by parsing actual system libraries, and thus don't need to
be updated here.

[1] https://android.googlesource.com/platform/bionic/+/android-1.6_r1/libc/stdio/mktemp.c
    https://android.googlesource.com/platform/bionic/+/android-1.6_r1/libc/Android.mk

[2] ad1ff2fb26

Change-Id: I838b54bcb5cbfd2fed24cf7649897889ec7a5559
This commit is contained in:
David 'Digit' Turner
2013-10-24 19:39:13 +02:00
parent 8edf8ef6aa
commit 82703204a9
3 changed files with 3 additions and 0 deletions

View File

@@ -56,6 +56,7 @@ extern int putenv(const char *);
extern int setenv(const char *, const char *, int);
extern int unsetenv(const char *);
extern char *mkdtemp(char *);
extern char *mktemp (char *);
extern int mkstemp (char *);