/src/libressl/crypto/compat/getprogname_linux.c
Line | Count | Source (jump to first uncovered line) |
1 | | #include <stdlib.h> |
2 | | |
3 | | #include <errno.h> |
4 | | |
5 | | const char * |
6 | | getprogname(void) |
7 | 0 | { |
8 | | #if defined(__ANDROID_API__) && __ANDROID_API__ < 21 |
9 | | /* |
10 | | * Android added getprogname with API 21, so we should not end up here |
11 | | * with APIs newer than 21. |
12 | | * https://github.com/aosp-mirror/platform_bionic/blob/1eb6d3/libc/include/stdlib.h#L160 |
13 | | * |
14 | | * Since Android is using portions of OpenBSD libc, it should have |
15 | | * a symbol called __progname. |
16 | | * https://github.com/aosp-mirror/platform_bionic/commit/692207 |
17 | | */ |
18 | | extern const char *__progname; |
19 | | return __progname; |
20 | | #else |
21 | 0 | return program_invocation_short_name; |
22 | 0 | #endif |
23 | 0 | } |