From: Robert Yang <[email protected]> O_CLOEXEC is introduced from Linux 2.6.23, so old kernel doesn't have it, we need check before use.
This patch is much more like a workaround, since it may need fcntl() use FD_CLOEXEC to replace. This problem was reported by "Ting Liu <[email protected]>" [Thomas De Schampheleire <[email protected]: - move dummy definition from libkmod-internal.h to missing.h - update commit title] --- libkmod/missing.h | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/libkmod/missing.h b/libkmod/missing.h index 4c0d136..e123e98 100644 --- a/libkmod/missing.h +++ b/libkmod/missing.h @@ -19,6 +19,10 @@ # define __NR_finit_module -1 #endif +#ifndef O_CLOEXEC +#define O_CLOEXEC 0 +#endif + #ifndef HAVE_FINIT_MODULE #include <errno.h> -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-modules" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
