From 58ece20278fdc8730a017a1744afe717ccb771de Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 7 Jun 2011 02:19:05 -0400 Subject: libmtd: use O_CLOEXEC Not strictly necessary, but this is good library behavior and should carry no runtime overhead. Signed-off-by: Mike Frysinger Signed-off-by: Artem Bityutskiy --- include/common.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/common.h') diff --git a/include/common.h b/include/common.h index c37660c..7ea282c 100644 --- a/include/common.h +++ b/include/common.h @@ -23,6 +23,7 @@ #include #include #include +#include #include #ifndef PROGRAM_NAME @@ -42,6 +43,10 @@ extern "C" { #define min(a, b) MIN(a, b) /* glue for linux kernel source */ #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) +#ifndef O_CLOEXEC +#define O_CLOEXEC 0 +#endif + /* Verbose messages */ #define bareverbose(verbose, fmt, ...) do { \ if (verbose) \ -- cgit v1.2.3