1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-09 06:01:28 +00:00

Use socket_strerror() for error reporting.

Report and patch by Gisle Vanem.
This commit is contained in:
henri
2013-08-06 20:10:49 +00:00
parent 3a8607d65c
commit 40b11064e4

View File

@@ -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");