Merge branch 'collectd-5.4' into collectd-5.5
[collectd.git] / src / sigrok.c
index eecb54c..487f31a 100644 (file)
@@ -360,10 +360,13 @@ static int sigrok_init(void)
                return -1;
        }
 
-       if ((status = plugin_thread_create(&sr_thread, NULL, sigrok_read_thread,
-                       NULL)) != 0) {
+       status = plugin_thread_create(&sr_thread, NULL, sigrok_read_thread,
+                       NULL);
+       if (status != 0)
+       {
+               char errbuf[1024];
                ERROR("sigrok plugin: Failed to create thread: %s.",
-                               strerror(status));
+                               sstrerror (errno, errbuf, sizeof (errbuf)));
                return -1;
        }
        sr_thread_running = TRUE;