diff options
Diffstat (limited to 'src/gallium/auxiliary/util')
-rw-r--r-- | src/gallium/auxiliary/util/u_dl.c | 13 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_dl.h | 7 |
2 files changed, 20 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_dl.c b/src/gallium/auxiliary/util/u_dl.c index 37ed789f955..220860ebf4b 100644 --- a/src/gallium/auxiliary/util/u_dl.c +++ b/src/gallium/auxiliary/util/u_dl.c @@ -78,3 +78,16 @@ util_dl_close(struct util_dl_library *library) (void)library; #endif } + + +const char * +util_dl_error(void) +{ +#if defined(PIPE_OS_UNIX) + return dlerror(); +#elif defined(PIPE_OS_WINDOWS) + return "unknown error"; +#else + return "unknown error"; +#endif +} diff --git a/src/gallium/auxiliary/util/u_dl.h b/src/gallium/auxiliary/util/u_dl.h index 85296c58af6..2853b447c61 100644 --- a/src/gallium/auxiliary/util/u_dl.h +++ b/src/gallium/auxiliary/util/u_dl.h @@ -70,4 +70,11 @@ void util_dl_close(struct util_dl_library *library); +/** + * Return most recent error message. + */ +const char * +util_dl_error(void); + + #endif /* U_DL_H_ */ |