cmake: Add a check for strsignal().
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index 6e52232..e5c2f56 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -80,6 +80,7 @@
 check_function_exists(printf HAVE_PRINTF)
 check_function_exists(setjmp HAVE_SETJMP)
 check_function_exists(signal HAVE_SIGNAL)
+check_function_exists(strsignal HAVE_STRSIGNAL)
 check_function_exists(sprintf HAVE_SNPRINTF)
 check_function_exists(strcmp HAVE_STRCMP)
 check_function_exists(strcpy HAVE_STRCPY)
diff --git a/src/cmocka.c b/src/cmocka.c
index 8da2272..3db8a3f 100755
--- a/src/cmocka.c
+++ b/src/cmocka.c
@@ -1515,10 +1515,10 @@
 
 #ifndef _WIN32
 static void exception_handler(int sig) {
-#ifdef _HPUX
-    print_error("%d\n", sig);
-#else
+#ifdef HAVE_STRSIGNAL
     print_error("%s\n", strsignal(sig));
+#else
+    print_error("%d\n", sig);
 #endif
     exit_test(1);
 }