Imported Upstream version 1.2.0
[psensor-pkg-debian.git] / src / lib / pmutex.c
index ec529bd..371a5d5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010-2014 jeanfi@gmail.com
+ * Copyright (C) 2010-2016 jeanfi@gmail.com
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -21,6 +21,7 @@
 
 #include <plog.h>
 #include <pmutex.h>
+#include <string.h>
 
 int pmutex_lock(pthread_mutex_t *m)
 {
@@ -29,7 +30,7 @@ int pmutex_lock(pthread_mutex_t *m)
        ret = pthread_mutex_lock(m);
 
        if (ret)
-               log_err("pmutex_lock: %p %d", m, ret);
+               log_err("pmutex_lock: %p %d %s", m, ret, strerror(ret));
 
        return ret;
 }