[vlc-devel] [PATCH 1/1] If the target libc lacks strerror_l, fallback to strerror_r.

Richard Diamond wichard at vitalitystudios.com
Mon Mar 14 04:15:26 CET 2016


On Sun, Mar 13, 2016 at 9:47 PM, Rémi Denis-Courmont <remi at remlab.net>
wrote:

> Did you actually test this?!
>

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).

If you'd like to test, compile the following with -D_GNU_SOURCE:

#include <string.h>
#include <stdio.h>
#include <errno.h>

int main() {

  printf("%s\n", strerror_r(EBUSY, NULL, 0));

  return 0;
}

"Device or resource busy"

Regards,
Richard Diamond
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20160313/f0606131/attachment.html>


More information about the vlc-devel mailing list