From: Keir Fraser Subject: Re: build error: strerror() ... Date: Sat, 09 Dec 2006 08:59:57 +0000 Message-ID: References: <20061208220815.GE4742@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20061208220815.GE4742@redhat.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Daniel P. Berrange" , Keir Fraser Cc: Gerd Hoffmann , Xen devel list List-Id: xen-devel@lists.xenproject.org On 8/12/06 10:08 pm, "Daniel P. Berrange" wrote: >> strerror_r() sucks. I removed it and used a pthread mutex instead. > > If you '#define _XOPEN_SOURCE 600' then glibc will provide the standards > compliant version of strerror_r which always uses the user supplied buffer. > Seems simpler than rolling our own code using pthreads mutexes. My Debian build box defines only the GNU version. It seems that strerror_r() is basically unusable unless you do a 'configure'-style compile test to set a build flag. -- Keir