Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACCP0GrZ=enRGBc_ct3KjyLNJ826G3AjYW5mVv8OVAb-e1u9+A@mail.gmail.com>
Date: Wed, 1 Jan 2014 19:42:47 +0000
From: Raphael Cohn <raphael.cohn@...rmmq.com>
To: musl@...ts.openwall.com
Subject: musl & strndupa?

Hi,

I'm trying to compile 'audit' (aka libaudit, auditd, etc - from
http://people.redhat.com/sgrubb/audit/index.html version 2.3.2). Using musl
0.9.14.

The file 'src/ausearch-lol.c' uses a reference to 'strndupa', which I
presume is an alloca version of strndup, and presumably a _GNU_SOURCE
feature. I can't seem to see a definition for it in musl, although strdupa
exists in string.h (Indeed, http://linux.die.net/man/3/strdup suggests as
much).

Is this intentional? If so, what would anyone suggest as a work around? My
guess would be  #define strndupa(x, t) strncpy(alloca(strlen(x)+1),x,t)
but I'd like a second opinion...

Raph

Content of type "text/html" skipped

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.