Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
GLib
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
924
Issues
924
List
Boards
Labels
Service Desk
Milestones
Merge Requests
58
Merge Requests
58
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GNOME
GLib
Commits
84dd8924
Commit
84dd8924
authored
May 27, 2020
by
Philip Withnall
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gfileutils: Use g_fsync() for platform-independence
Signed-off-by:
Philip Withnall
<
withnall@endlessm.com
>
parent
ea2db920
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
glib/gfileutils.c
glib/gfileutils.c
+2
-2
No files found.
glib/gfileutils.c
View file @
84dd8924
...
@@ -1066,7 +1066,7 @@ rename_file (const char *old_name,
...
@@ -1066,7 +1066,7 @@ rename_file (const char *old_name,
if
(
dir_fd
>=
0
)
if
(
dir_fd
>=
0
)
{
{
fsync
(
dir_fd
);
g_
fsync
(
dir_fd
);
g_close
(
dir_fd
,
NULL
);
g_close
(
dir_fd
,
NULL
);
}
}
...
@@ -1182,7 +1182,7 @@ write_to_file (const gchar *contents,
...
@@ -1182,7 +1182,7 @@ write_to_file (const gchar *contents,
#ifdef HAVE_FSYNC
#ifdef HAVE_FSYNC
errno
=
0
;
errno
=
0
;
if
(
do_fsync
&&
fsync
(
fd
)
!=
0
)
if
(
do_fsync
&&
g_
fsync
(
fd
)
!=
0
)
{
{
int
saved_errno
=
errno
;
int
saved_errno
=
errno
;
set_file_error
(
err
,
set_file_error
(
err
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment