diff options
author | midipix <writeonce@midipix.org> | 2025-06-21 18:17:52 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2025-06-21 18:17:52 +0000 |
commit | 130e2180398d23fec3228f9507d84791e738b826 (patch) | |
tree | 247dd20e4950cdb0e0442f86db4cacbd3e7ce484 | |
parent | 85b7ff078d0a71e65174c18a30ac62f923ccf8d7 (diff) | |
download | sltdl-130e2180398d23fec3228f9507d84791e738b826.tar.bz2 sltdl-130e2180398d23fec3228f9507d84791e738b826.tar.xz |
-rw-r--r-- | include/sltdl/sltdl.h | 3 | ||||
-rw-r--r-- | src/core/lt_core.c | 7 |
2 files changed, 10 insertions, 0 deletions
diff --git a/include/sltdl/sltdl.h b/include/sltdl/sltdl.h index f9cc483..007d5ee 100644 --- a/include/sltdl/sltdl.h +++ b/include/sltdl/sltdl.h @@ -136,6 +136,9 @@ lt_api int lt_dlpreload_default(const struct lt_symdef *); lt_api int lt_dlloader_add(const struct lt_dlentry *); lt_api const struct lt_dlentry * lt_dlloader_find(const char *); +/* custom errors */ +lt_api int lt_dlseterror (int); + #ifdef __cplusplus } #endif diff --git a/src/core/lt_core.c b/src/core/lt_core.c index e3cadd4..031701a 100644 --- a/src/core/lt_core.c +++ b/src/core/lt_core.c @@ -130,3 +130,10 @@ const char * lt_dlerror(void) return errdesc; } + +int lt_dlseterror(int errcode) +{ + lt_slock(); + lt_sunlock(0,errcode); + return 0; +} |