libstorage / libstoragemgmt

A library for storage management
https://libstorage.github.io/libstoragemgmt-doc/
GNU Lesser General Public License v2.1
83 stars 32 forks source link

libstoragemgmt doesn't compile on Alpine Linux (musl) #401

Closed PhoenixMage closed 4 years ago

PhoenixMage commented 4 years ago

Mainly due to only having POSIX stderr_r which I believe is deprecated in favor of stderr_l. I have created a quick and dirty patch to switch to stderr_l and have compiled successfully.

tasleson commented 4 years ago

If you can supply a PR which addresses the compile issues in a compatible way, we would gladly incorporate it, thanks!

tasleson commented 4 years ago

I believe the issue is related to strerror_* family of functions and which one we are using in the library.

#include <string.h>

char *strerror(int errnum);

int strerror_r(int errnum, char *buf, size_t buflen);
                   /* XSI-compliant */

char *strerror_r(int errnum, char *buf, size_t buflen);
                   /* GNU-specific */

char *strerror_l(int errnum, locale_t locale);
PhoenixMage commented 4 years ago

Sorry it was late, you are correct. I will supply a PR shortly.

tasleson commented 4 years ago

According to @PhoenixMage this is working now.