From 40b11064e448d9e69e5dfaf30bb52df67e6910c8 Mon Sep 17 00:00:00 2001 From: henri Date: Tue, 6 Aug 2013 20:10:49 +0000 Subject: [PATCH] Use socket_strerror() for error reporting. Report and patch by Gisle Vanem. --- nsock/tests/tests_main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nsock/tests/tests_main.c b/nsock/tests/tests_main.c index 507a24de1..b163224c2 100644 --- a/nsock/tests/tests_main.c +++ b/nsock/tests/tests_main.c @@ -15,6 +15,10 @@ #define TEST_OK "[" BOLDGREEN "OK" RESET "]" +/* socket_strerror() comes from nbase + * Declared here to work around a silly inclusion issue until I can fix it. */ +char *socket_strerror(int errnum); + extern const struct test_case TestPoolUserData; extern const struct test_case TestTimer; extern const struct test_case TestLogLevels; @@ -64,7 +68,7 @@ int main(int ac, char **av) { fflush(stdout); rc = test_case_run(current); if (rc) { - printf(TEST_FAILED " (%s)\n", strerror(-rc)); + printf(TEST_FAILED " (%s)\n", socket_strerror(-rc)); break; } printf(TEST_OK "\n");