diff options
Diffstat (limited to 'src/fontfile/fileio.c')
-rw-r--r-- | src/fontfile/fileio.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/fontfile/fileio.c b/src/fontfile/fileio.c index 80af511..d44cecd 100644 --- a/src/fontfile/fileio.c +++ b/src/fontfile/fileio.c @@ -36,6 +36,9 @@ in this Software without prior written authorization from The Open Group. #ifndef O_BINARY #define O_BINARY O_RDONLY #endif +#ifndef O_CLOEXEC +#define O_CLOEXEC 0 +#endif FontFilePtr FontFileOpen (const char *name) @@ -44,7 +47,7 @@ FontFileOpen (const char *name) int len; BufFilePtr raw, cooked; - fd = open (name, O_BINARY); + fd = open (name, O_BINARY|O_CLOEXEC); if (fd < 0) return 0; raw = BufFileOpenRead (fd); |