Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 254144 - pax-utils-0.1.19 fails on FreeBSD, no strndup.
Summary: pax-utils-0.1.19 fails on FreeBSD, no strndup.
Status: RESOLVED DUPLICATE of bug 249731
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: FreeBSD (show other bugs)
Hardware: All FreeBSD
: High normal (vote)
Assignee: Gentoo/BSD Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-07 20:16 UTC by Javier Villavicencio (RETIRED)
Modified: 2009-01-07 21:23 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Javier Villavicencio (RETIRED) gentoo-dev 2009-01-07 20:16:43 UTC
i686-gentoo-freebsd7.0-gcc -O2 -pipe   paxelf.o paxinc.o xfuncs.o scanelf.o -o scanelf
scanelf.o: In function `scanelf_file_sym':
scanelf.c:(.text+0xe10): undefined reference to `strndup'
scanelf.c:(.text+0x1060): undefined reference to `strndup'
collect2: ld returned 1 exit status
gmake: *** [scanelf] Error 1

strlcpy would be a better alternative.
Comment 1 solar (RETIRED) gentoo-dev 2009-01-07 20:29:38 UTC
eh? strndup and strlcpy are 2 completely different functions.

With that said strndup() is a handy function. BSD you probably want to make an additionly function that does what strndup() does.

Comment 2 Javier Villavicencio (RETIRED) gentoo-dev 2009-01-07 20:48:24 UTC
Didn't see the previous bug filed, changing this one to duplicate of 249731.

And, it's not only BSD. Every other non-gnu operating system most likely won't have a strndup().


*** This bug has been marked as a duplicate of bug 249731 ***
Comment 3 SpanKY gentoo-dev 2009-01-07 21:17:05 UTC
strndup() is in POSIX, strlcpy() isnt ... nor is it in glibc ...

besides, you can blame Diego for it ;)
Comment 4 Javier Villavicencio (RETIRED) gentoo-dev 2009-01-07 21:23:54 UTC
(In reply to comment #3)
> strndup() is in POSIX, strlcpy() isnt ... nor is it in glibc ...
> 
Yeah, sorry, I mixed up the names with strncpy.

> besides, you can blame Diego for it ;)
> 

lol?