On 19 June 2013 16:17, Ben Pfaff <[email protected]> wrote:
> +#if STRERROR_R_CHAR_P
> + /* GNU style strerror_r() might return an immutable static string, or it
> + * might write and return 'buffer', but in either case we can pass the
> + * returned string directly to the caller. */
> + s = strerror_r(error, buffer, BUFSIZE);
> +#else /* strerror_r() returns an int. */
> + s = buffer;
> + if (strerror_r(error, buffer, BUFSIZE)) {
> + /* strerror_r() is only allowed to fail on ERANGE (because the buffer
> + * is too short). We don't check the actual failure reason because
> + * POSIX requires strerror_r() to return the error but old glibc
> + * (before 2.13) returns -1 and sets errno. */
> + snprintf(buffer, ptb.bufsize, "Unknown error %d", error);
This one fails to build with:
lib/util.c:342:26: error: use of undeclared identifier 'ptb'
snprintf(buffer, ptb.bufsize, "Unknown error %d", error);
^
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev