[netcf-devel] NetCF FreeBSD porting

Ed Maste emaste at freebsd.org
Thu Sep 13 18:29:51 UTC 2012


On 13 September 2012 13:46, Daniel P. Berrange <berrange at redhat.com> wrote:

>> One item I noticed during review, the char *-returning strerror_r is a
>> GNU-specific version and the current code addresses this with an
>> #ifdef __FreeBSD__ for each use.  Just calling strerror_r first should
>> be fine on both platforms - any objection to changing each
>>
>> report_error(..., strerror_r(errno, errbuf, sizeof(errbuf));
>>
>> to
>>
>> strerror_r(errno, errbuf, sizeof(errbuf));
>> report_error(..., errbuf);
>
> No need to #ifdef for BSD. Instead just add 'strerror_r-posix' to
> the GNULIB bootstrap.conf file. That will bring in a version that
> complies with the POSIX signature, ie returns int, not char *

Ok - I've committed these changes to my work tree
https://github.com/emaste/netcf/commits/freebsd-port

I'll shuffle this around and post a commit candidate patch that moves
this code to dutil_posix.c before making the change.

-Ed


More information about the netcf-devel mailing list