diff options
-rw-r--r-- | crypto/compat/getprogname_linux.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/crypto/compat/getprogname_linux.c b/crypto/compat/getprogname_linux.c index 6550eb8..1850e86 100644 --- a/crypto/compat/getprogname_linux.c +++ b/crypto/compat/getprogname_linux.c | |||
@@ -5,23 +5,16 @@ | |||
5 | const char * | 5 | const char * |
6 | getprogname(void) | 6 | getprogname(void) |
7 | { | 7 | { |
8 | #if defined(__ANDROID_API__) && __ANDROID_API__ < 21 | ||
8 | /* | 9 | /* |
9 | * Android added getprogname with API 21 [0]. We should not end up here | 10 | * Android added getprogname with API 21, so we should not end up here |
10 | * with APIs bigger than 21. Still write a precise check. | 11 | * with APIs newer than 21. |
12 | * https://github.com/aosp-mirror/platform_bionic/blob/1eb6d3/libc/include/stdlib.h#L160 | ||
11 | * | 13 | * |
12 | * Since Android is using portions of OpenBSD libc, it should have | 14 | * Since Android is using portions of OpenBSD libc, it should have |
13 | * a symbol called __progname [1]. | 15 | * a symbol called __progname. |
14 | * | 16 | * https://github.com/aosp-mirror/platform_bionic/commit/692207 |
15 | * | ||
16 | * .. [0] https://github.com/aosp-mirror/platform_bionic/blob/1eb6d3/libc/include/stdlib.h#L160 | ||
17 | * | ||
18 | * .. [1] https://github.com/aosp-mirror/platform_bionic/commit/692207 | ||
19 | * | ||
20 | * .. [2] https://linux.die.net/man/3/program_invocation_short_name | ||
21 | * | ||
22 | * .. [3] https://android.googlesource.com/platform/system/core/+/2819c0/base/logging.cpp#65 | ||
23 | */ | 17 | */ |
24 | #if defined(__ANDROID_API__) && __ANDROID_API__ < 21 | ||
25 | extern const char *__progname; | 18 | extern const char *__progname; |
26 | return __progname; | 19 | return __progname; |
27 | #else | 20 | #else |