%m, #614

Richard Laager rlaager at wiktel.com
Thu Aug 29 21:52:16 UTC 2019


On 8/29/19 4:04 PM, Hal Murray via devel wrote:
> Gary said:
> [API for strerror_r()]
>> On Linux, yes.  But not on all distros.  For example, on Android, which gpsd
>> supports, strerror_r() always returns an int.  No options. 
> 
> Same on NetBSD and FreeBSD.

Right, so that seems like an argument to use the XSI interface, not the
GNU one. Everyone but Linux glibc uses the XSI interface, and Linux
glibc can be configured to present the XSI interface.

"The XSI-compliant version is provided if: (_POSIX_C_SOURCE >= 200112L)
&& ! _GNU_SOURCE"

So basically, don't set _GNU_SOURCE, and either don't set
_POSIX_C_SOURCE at all, or set _POSIX_C_SOURCE to 200112L (or something
newer)?

Then make sure the NTPsec code is consistently written with the
assumption of the XSI interface, not the GNU one (i.e. fix one of the
mismatches in NTPsec, if that hasn't already been done).

-- 
Richard


More information about the devel mailing list