Subject: Re: CVS commit: pkgsrc/audio/tosha
To: Roland Illig <>
From: Greg Troxel <>
List: tech-pkg
Date: 10/18/2007 08:17:43
Roland Illig <> writes:

>>>NetBSD already has strndup.
>> But only since 2006/08/12, so this check is not correct.
> Thanks for the remark.
> What is the best way to check for it? audio/tosha doesn't use GNU configure.
> Unfortunately, the strndup man page doesn't say a single word about
> the history of strndup, so I couldn't know.

I think the best way is something like configure.

I wonder if pkgsrc should grow an option to run a configure test and
define a symbol, so we can patch up programs that need feature tests but
don't do autoconf.

Another alternative is to patch tosha to call tit tosha_strndup and not
try to ifdef on whether strndup is present.  That will fix a bunch of
platforms at once and avoid the detection issue.