mailing list of musl libc
 help / color / mirror / code / Atom feed
* musl & strndupa?
@ 2014-01-01 19:42 Raphael Cohn
  2014-01-01 19:54 ` Rich Felker
  0 siblings, 1 reply; 4+ messages in thread
From: Raphael Cohn @ 2014-01-01 19:42 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 637 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 902 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-01-01 20:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-01 19:42 musl & strndupa? Raphael Cohn
2014-01-01 19:54 ` Rich Felker
2014-01-01 20:07   ` Raphael Cohn
2014-01-01 20:18     ` Rich Felker

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).