summaryrefslogtreecommitdiff
path: root/glnx-fdio.c
diff options
context:
space:
mode:
authorWill Thompson <wjt@endlessos.org>2023-02-27 11:24:28 +0000
committerWill Thompson <wjt@endlessos.org>2023-02-27 11:24:28 +0000
commit07e3e49d3e47dfd4265ffb5495111439131715ca (patch)
tree25f3c4e0e0dd4244b87ddcff3715e465287f5a79 /glnx-fdio.c
parent4e44fd9c174e4196a86fb6d954722feaff612c88 (diff)
parentea18312ed03e0077740e327966a8e0e5810d7f5b (diff)
downloadlibglnx-master.tar.gz
Merge branch 'wip/smcv/steal-fd' into 'master'HEADmaster
backports: Add g_steal_fd, from GLib >= 2.70 See merge request GNOME/libglnx!47
Diffstat (limited to 'glnx-fdio.c')
-rw-r--r--glnx-fdio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/glnx-fdio.c b/glnx-fdio.c
index b1af679..9873205 100644
--- a/glnx-fdio.c
+++ b/glnx-fdio.c
@@ -218,7 +218,7 @@ open_tmpfile_core (int dfd, const char *subpath,
return glnx_throw_errno_prefix (error, "fchmod");
out_tmpf->initialized = TRUE;
out_tmpf->src_dfd = dfd; /* Copied; caller must keep open */
- out_tmpf->fd = glnx_steal_fd (&fd);
+ out_tmpf->fd = g_steal_fd (&fd);
out_tmpf->path = NULL;
return TRUE;
}
@@ -245,7 +245,7 @@ open_tmpfile_core (int dfd, const char *subpath,
{
out_tmpf->initialized = TRUE;
out_tmpf->src_dfd = dfd; /* Copied; caller must keep open */
- out_tmpf->fd = glnx_steal_fd (&fd);
+ out_tmpf->fd = g_steal_fd (&fd);
out_tmpf->path = g_steal_pointer (&tmp);
return TRUE;
}
@@ -463,7 +463,7 @@ glnx_tmpfile_reopen_rdonly (GLnxTmpfile *tmpf,
}
glnx_close_fd (&tmpf->fd);
- tmpf->fd = glnx_steal_fd (&rdonly_fd);
+ tmpf->fd = g_steal_fd (&rdonly_fd);
return TRUE;
}