You can use #if __GLIBC_PREREQ(2, 17) On Mon, May 13, 2013 at 1:13 PM, İsmail Dönmez <ismail at donmez.ws> wrote:> Hi, > > > On Mon, May 13, 2013 at 11:07 AM, Evgeniy Stepanov < > eugeni.stepanov at gmail.com> wrote: > >> On Mon, May 13, 2013 at 11:03 AM, İsmail Dönmez <ismail at donmez.ws> wrote: >> > I am guessing you are running on this on an old system. My glibc >> version is >> > 2.17 >> >> Yes. Ubuntu 12.04 LTS with glibc 2.15 does not have aligned_alloc. >> > > Then I guess we'll somehow need a glibc version check or something. Not > sure how to do it atm. > > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130513/ba952394/attachment.html>
On Mon, May 13, 2013 at 11:16 AM, Kostya Serebryany <kcc at google.com> wrote:> __GLIBC_PREREQ(2, 17)Attached patch should work. Please test. Regards. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130513/7670a30e/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: linux.diff Type: application/octet-stream Size: 720 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130513/7670a30e/attachment.obj>
Thanks, it works. 2.15 has quick_exit and at_quick_exit. The attached patch also works. On Mon, May 13, 2013 at 11:22 AM, İsmail Dönmez <ismail at donmez.ws> wrote:> > On Mon, May 13, 2013 at 11:16 AM, Kostya Serebryany <kcc at google.com> wrote: >> >> __GLIBC_PREREQ(2, 17) > > > Attached patch should work. Please test. > > Regards. >-------------- next part -------------- A non-text attachment was scrubbed... Name: linux2.diff Type: application/octet-stream Size: 755 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130513/a58ed401/attachment.obj>