Attention is currently required from: Timur Davydov.
pespin has posted comments on this change by Timur Davydov. ( https://gerrit.osmocom.org/c/osmo-trx/+/42199?usp=email )
Change subject: fix(threads): support GNU and POSIX strerror_r variants ......................................................................
Patch Set 1:
(2 comments)
File CommonLibs/Threads.cpp:
https://gerrit.osmocom.org/c/osmo-trx/+/42199/comment/ab541672_61255e05?usp=... : PS1, Line 58: char *err_str = NULL; wrong indentation
https://gerrit.osmocom.org/c/osmo-trx/+/42199/comment/e2b5f56f_7e2ee524?usp=... : PS1, Line 59: #if defined(__GLIBC__) && defined(_GNU_SOURCE) Can we move all this into a helper function above so it can be reused?
char *strerror_buf(int err, char *buf, size_t buf_size) { #if defined(__GLIBC__) && defined(_GNU_SOURCE) char *err_str = NULL; err_str = strerror_r(err, buf, sizeof(buf)); #else if (strerror_r(err, buf, sizeof(buf)) == 0) { err_str = buf; } else { snprintf(buf, sizeof(buf), "Unknown error %d", err); err_str = buf; } #endif return err_str; }