On Fri, 2011-07-01 at 06:48 -0700, Khem Raj wrote: > > On Jul 1, 2011, at 2:48 AM, Phil Blundell <[email protected]> wrote: > > > On Thu, 2011-06-30 at 22:38 -0700, Khem Raj wrote: > >> ++#ifdef __UCLIBC__ > >> ++/* uclibc does not implement mkostemp GNU extention */ > >> ++#define mkostemp(x,y) mkstemp(x) > >> ++#endif > > > > Is that safe? It would be nice to have some commentary in the patch > > explaining why the flags are not required for systemd to operate > > correctly. If it genuinely doesn't need to be using mkostemp() then > > perhaps this change should just be made upstream for all libcs. > > > right > I have to test it eglibc systems
I'm not sure that's quite the point. What I was trying to say before was that, if systemd is going to the trouble of using mkostemp() rather than mkstemp() in the first place, one would normally assume that it is expecting that extra argument to be respected. So it seems like there are two possibilities: a) the standardised semantics of mkstemp() are actually sufficient for systemd's requirements and there was no need for it to be using mkostemp() at all. In this case it should just be patched (ideally upstream) to use mkstemp() unconditionally. b) the specific semantics of uClibc's mkstemp() implementation are sufficient for systemd's needs, although the semantics guaranteed by the standards are not. In this case your patch might be appropriate but there should be a comment explaining why it is safe and what exactly the uClibc behaviour is that it depends on. This would still not be an ideal state of affairs since uClibc might change in the future, but it's probably acceptable; a better solution might be either to add mkostemp() into uClibc explicitly, or to patch systemd to obtain the semantics that it needs by some other route. I'm not familiar enough with either systemd or uClibc to know which of the above is true here. Can you clarify? p. _______________________________________________ Openembedded-devel mailing list [email protected] http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
