Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 453634 - sys-libs/uclibc-0.9.33.2: add functions dup3 and mkostemp for building sys-fs/udev-197 and above
Summary: sys-libs/uclibc-0.9.33.2: add functions dup3 and mkostemp for building sys-fs...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-23 08:24 UTC by Tibor Vago
Modified: 2013-01-26 19:00 UTC (History)
2 users (show)

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


Attachments
build log (build.log,458.48 KB, text/plain)
2013-01-23 08:26 UTC, Tibor Vago
Details
temporary workaround patch (udev197-mkostemp-dup3.patch,5.30 KB, patch)
2013-01-23 08:28 UTC, Tibor Vago
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tibor Vago 2013-01-23 08:24:53 UTC
Can't compile udev-197 as uClibc doesn't provide dup3 and mkostemp definitions.
Comment 1 Tibor Vago 2013-01-23 08:26:08 UTC
Created attachment 336552 [details]
build log
Comment 2 Tibor Vago 2013-01-23 08:28:58 UTC
Created attachment 336554 [details, diff]
temporary workaround patch

This is a workaround patch to compile udev but I think this is not the proper way. Maybe uClibc migth have dup3 and mkostemp.
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2013-01-23 17:47:42 UTC
According to Mike these should be in uclibc head so these 2 functions should be backported to the current uclibc in tree.

Reassigning to uclibc maintainers.

https://bugs.gentoo.org/show_bug.cgi?id=443030#c1
Comment 4 Anthony Basile gentoo-dev 2013-01-23 23:51:41 UTC
(In reply to comment #3)
> According to Mike these should be in uclibc head so these 2 functions should
> be backported to the current uclibc in tree.
> 
> Reassigning to uclibc maintainers.
> 
> https://bugs.gentoo.org/show_bug.cgi?id=443030#c1

Yeah there is also another problem with Tibor's patch.  You can't just do

-        fd = mkostemp(path, O_RDWR|O_CLOEXEC);
+        fd = mkstemp(path);

since these are not equivalent.  Dropping the O_CLOEXEC could lead to a race condition.  I'm not 100% sure since I don't know the threading going on there, but it is safer to do:

+        fd = mkstemp(path);
+        fcntl(fd, F_SETFD, FD_CLOEXEC);
Comment 6 Tibor Vago 2013-01-26 18:10:05 UTC
Hi SpanKY,

in the end of "03_all_dup3-1.patch" there is dup2, and not dup3...

Cheers,
oreggin
Comment 7 SpanKY gentoo-dev 2013-01-26 18:16:36 UTC
should be all set now in the tree; thanks for the report!

Commit message: Add dup3/mkostemp support
http://sources.gentoo.org/sys-libs/uclibc/uclibc-0.9.33.2-r3.ebuild?rev=1.1
Comment 8 Tibor Vago 2013-01-26 19:00:49 UTC
I've tested the patches, and works well on my machine.

Thx, SpanKY