Fix strerror_r usage

glibc ships with 2 versions of strerror_r

* XSI version that  returns int and does nothing on error
* GNU version that returns a string but not necessarily in the provided buffer.

This patch introduces gnu_strerror_r that acts like the GNU variant.

Change-Id: I0358b26c8412e0a169483671c8a3ba0936436e7d
Signed-off-by: Dima Kuznetsov <dkuznets@redhat.com>
Signed-off-by: Saggi Mizrahi <ficoos@gmail.com>