diff --git a/libguac/src/error.c b/libguac/src/error.c index d7411db1..67ef367c 100644 --- a/libguac/src/error.c +++ b/libguac/src/error.c @@ -36,6 +36,8 @@ * ***** END LICENSE BLOCK ***** */ #include +#include +#include #ifdef HAVE_LIBPTHREAD #include @@ -49,7 +51,6 @@ const char* __GUAC_STATUS_SUCCESS_STR = "Success"; const char* __GUAC_STATUS_NO_MEMORY_STR = "Insufficient memory"; const char* __GUAC_STATUS_NO_INPUT_STR = "End of input stream"; const char* __GUAC_STATUS_INPUT_TIMEOUT_STR = "Read timeout"; -const char* __GUAC_STATUS_SEE_ERRNO_STR = "(see value of errno)"; const char* __GUAC_STATUS_OUTPUT_ERROR_STR = "Output error"; const char* __GUAC_STATUS_BAD_ARGUMENT_STR = "Invalid argument"; const char* __GUAC_STATUS_BAD_STATE_STR = "Illegal state"; @@ -78,7 +79,7 @@ const char* guac_status_string(guac_status status) { /* Further information in errno */ case GUAC_STATUS_SEE_ERRNO: - return __GUAC_STATUS_SEE_ERRNO_STR; + return strerror(errno); /* Output error */ case GUAC_STATUS_OUTPUT_ERROR: