<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Mar 13, 2016 at 9:47 PM, Rémi Denis-Courmont <span dir="ltr"><<a href="mailto:remi@remlab.net" target="_blank">remi@remlab.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><u></u>
<div><div style="font-size:12pt;font-family:Calibri,sans-serif"><div>Did you actually test this?!</div></div></div></blockquote><div><br></div><div>Yes (and again after getting your reply to be sure). Also note that the version of `strerror_r` that returns a char* is GNU which is allowed to (and does) return a static char*, thus ignoring __buf (the NULL param).</div><div><br></div><div>If you'd like to test, compile the following with -D_GNU_SOURCE:</div><div><br></div><div><div>#include <string.h></div><div>#include <stdio.h></div><div>#include <errno.h></div><div><br></div><div>int main() {</div><div><br></div><div>  printf("%s\n", strerror_r(EBUSY, NULL, 0));</div><div><br></div><div>  return 0;</div><div>}</div></div><div><br></div><div>"Device or resource busy"</div><div><br></div><div>Regards,</div><div>Richard Diamond</div></div></div></div>