diff --git a/third_party/musl/ndk_musl_include/dlfcn.h b/third_party/musl/ndk_musl_include/dlfcn.h index c764c8bed96614f79c99eae433d3563f355ab96e..985529a0dce2a6bd692a77b5043d212244f06e01 100644 --- a/third_party/musl/ndk_musl_include/dlfcn.h +++ b/third_party/musl/ndk_musl_include/dlfcn.h @@ -25,6 +25,19 @@ char *dlerror(void); void *dlopen(const char *, int); void *dlsym(void *__restrict, const char *__restrict); + +/** + * @brief Obtain address of a symbol in a shared object or executable + * + * @param (void *__restrict) the handle to the dynamic link library + * @param (const char *restrict) the name of the symbol to be looked up + * @param (const char *restrict) the specific version of the symbol to be looked up + * + * @return On success, return the address associated with symbol. On failure, return NULL + * @since 12 +*/ +void *dlvsym(void *__restrict, const char *__restrict, const char *__restrict); + /* namespace apis */ #define NS_NAME_MAX 255 typedef struct { diff --git a/third_party/musl/ndk_musl_include/unistd.h b/third_party/musl/ndk_musl_include/unistd.h index c0556ab7ffd6e8b429960008be8973487031d91b..ba046d4d43aff6d4bd879a09041f575ab9d3673a 100644 --- a/third_party/musl/ndk_musl_include/unistd.h +++ b/third_party/musl/ndk_musl_include/unistd.h @@ -138,6 +138,20 @@ int lockf(int, int, off_t); int nice(int); void sync(void); pid_t setpgrp(void); + +/** + * @brief Encrypts a password using the DES algorithm + * + * The `crypt` function encrypts the given password string using the DES algorithm + * and returns the encrypted string. It is commonly used for storing and verifying user passwords + * + * @param (const char *) The password string to be encrypted. + * @param (const char *) The salt value string used to increase the randomness of encryption + * + * @return Return the encrypted string or NULL in case of an error. + * @since 12 +*/ +char *crypt(const char *, const char *); void swab(const void *__restrict, void *__restrict, ssize_t); #endif @@ -176,6 +190,18 @@ int setresgid(gid_t, gid_t, gid_t); int getresuid(uid_t *, uid_t *, uid_t *); int getresgid(gid_t *, gid_t *, gid_t *); int syncfs(int); + +/** + * @brief Check permissions and existence of the file identified by pathname. + * + * @param (const char *) Path to the file. + * @param (int) The access permissions to be tested. + * + * @return On success, zero is returned. On error, -1 is returned + * + * @since 12 +*/ +int eaccess(const char *, int); ssize_t copy_file_range(int, off_t *, int, off_t *, size_t, unsigned); pid_t gettid(void); #endif diff --git a/third_party/musl/ndk_script/adapter/libc.ndk.json b/third_party/musl/ndk_script/adapter/libc.ndk.json index 41070eecda4bb977a650b3b593d7d405d468a4ec..db27a438dd868ddcf19690ecbbae9f7ed585cb0f 100644 --- a/third_party/musl/ndk_script/adapter/libc.ndk.json +++ b/third_party/musl/ndk_script/adapter/libc.ndk.json @@ -257,6 +257,7 @@ { "name": "creall" }, { "name": "creat" }, { "name": "creat64" }, + { "name": "crypt" }, { "name": "csin" }, { "name": "csinf" }, { "name": "csinh" }, @@ -287,6 +288,7 @@ { "name": "dlerror" }, { "name": "dlopen" }, { "name": "dlsym" }, + { "name": "dlvsym" }, { "name": "dn_comp" }, { "name": "dn_expand" }, { "name": "dn_skipname" }, @@ -298,6 +300,7 @@ { "name": "dup2" }, { "name": "dup3" }, { "name": "duplocale" }, + { "name": "eaccess" }, { "name": "endgrent" }, { "name": "endhostent" }, { "name": "endmntent" },