[OE-core] [PATCH v2] kmod: Handle undefined O_CLOEXEC

Radu Moisan radu.moisan at intel.com
Tue Jul 24 07:37:41 UTC 2012


As far as kmod package is concerned O_CLOEXEC is used in constructs like 
"O_RDONLY|O_CLOEXEC". O_CLOEXEC can be used (is defined) starting with 
Linux kernel ≥2.6.23 and glibc ≥2.7 case in which the patch does not 
logically changing anything. However, prior Linux kernel ≥2.6.23 
O_CLOEXEC is not defined (the case for CentOS 5.8 - kernel 2.6.18) and 
using it in code will cause build errors. My patch provides a workaround 
for those distributions that do not have O_CLOEXEC define, just to be 
able to build stuff. I have not tested on CentOS 5.8 if the applications 
are not broken in some way, but that's not in the scope of this patch. 
If something does indeed break, then a totally different patch is 
required, targeting a backport of kmod for kernel older than 2.6.23.

Radu

On 07/23/2012 05:34 PM, Enrico Scholz wrote:
> Radu Moisan <radu.moisan-ral2JQCrhuEAvxtiuMwx3w at public.gmane.org>
> writes:
>
>> Close-on-exec seems to be unsuported on some architectures like CentOS 5.8
>> and thus causing some packages to fail to build successfully.
> Have you verified that making O_CLOEXEC a noop does not break the
> applications?
>
>
> Enrico
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core






More information about the Openembedded-core mailing list