summaryrefslogtreecommitdiff
path: root/src/file.c
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/file.c
parent81dc4a481b64499ab7c355ee43c91e4fe0767545 (diff)
downloadxorg-lib-libXcursor-a353f02a7ac4504ad5edb5407278c7a03c507aef.tar.gz
If O_CLOEXEC is defined, add "e" to fopen modesHEADmaster
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src/file.c')
-rw-r--r--src/file.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/file.c b/src/file.c
index dacbf5c..0e26955 100644
--- a/src/file.c
+++ b/src/file.c
@@ -1019,7 +1019,7 @@ XcursorFilenameLoadImage (const char *file, int size)
if (!file || size < 0)
return NULL;
- f = fopen (file, "r");
+ f = fopen (file, "r" FOPEN_CLOEXEC);
if (!f)
return NULL;
image = XcursorFileLoadImage (f, size);
@@ -1036,7 +1036,7 @@ XcursorFilenameLoadImages (const char *file, int size)
if (!file || size < 0)
return NULL;
- f = fopen (file, "r");
+ f = fopen (file, "r" FOPEN_CLOEXEC);
if (!f)
return NULL;
images = XcursorFileLoadImages (f, size);
@@ -1053,7 +1053,7 @@ XcursorFilenameLoadAllImages (const char *file)
if (!file)
return NULL;
- f = fopen (file, "r");
+ f = fopen (file, "r" FOPEN_CLOEXEC);
if (!f)
return NULL;
images = XcursorFileLoadAllImages (f);
@@ -1072,7 +1072,7 @@ XcursorFilenameLoad (const char *file,
if (!file)
return XcursorFalse;
- f = fopen (file, "r");
+ f = fopen (file, "r" FOPEN_CLOEXEC);
if (!f)
return 0;
ret = XcursorFileLoad (f, commentsp, imagesp);
@@ -1089,7 +1089,7 @@ XcursorFilenameSaveImages (const char *file, const XcursorImages *images)
if (!file || !images)
return XcursorFalse;
- f = fopen (file, "w");
+ f = fopen (file, "w" FOPEN_CLOEXEC);
if (!f)
return 0;
ret = XcursorFileSaveImages (f, images);
@@ -1107,7 +1107,7 @@ XcursorFilenameSave (const char *file,
if (!file || !comments || !images)
return XcursorFalse;
- f = fopen (file, "w");
+ f = fopen (file, "w" FOPEN_CLOEXEC);
if (!f)
return 0;
ret = XcursorFileSave (f, comments, images);