summaryrefslogtreecommitdiff
path: root/src/xcursorint.h
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2023-03-25 12:14:36 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2023-03-25 12:14:36 -0700
commita353f02a7ac4504ad5edb5407278c7a03c507aef (patch)
tree6b3e1e2816cf308337905bd5c628932f3b685d55 /src/xcursorint.h
parent81dc4a481b64499ab7c355ee43c91e4fe0767545 (diff)
If O_CLOEXEC is defined, add "e" to fopen modes
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src/xcursorint.h')
-rw-r--r--src/xcursorint.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/xcursorint.h b/src/xcursorint.h
index d8f9ea3..121fb29 100644
--- a/src/xcursorint.h
+++ b/src/xcursorint.h
@@ -38,6 +38,13 @@
#include "Xcursor.h"
#include "config.h"
+#include <fcntl.h>
+#ifdef O_CLOEXEC
+#define FOPEN_CLOEXEC "e"
+#else
+#define FOPEN_CLOEXEC ""
+#endif
+
typedef struct _XcursorFontInfo {
struct _XcursorFontInfo *next;
Font font;