summaryrefslogtreecommitdiff
path: root/glnx-fdio.h
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2016-05-03 17:20:43 -0400
committerColin Walters <walters@verbum.org>2016-05-03 17:23:17 -0400
commit3d162e772db80f6664a78583268150d2e1d1d29e (patch)
treef74bfea103ad76a39dc72433c68de4d683cc17b1 /glnx-fdio.h
parent85c9dd5c073a8c0d74c4baa2e4a94f5535984e62 (diff)
downloadlibglnx-3d162e772db80f6664a78583268150d2e1d1d29e.tar.gz
fdio: Add glnx_stream_fstat
Migrated from libgsystem's `gs_stream_fstat()`. It's a small function but I end up using it in OSTree a fair bit.
Diffstat (limited to 'glnx-fdio.h')
-rw-r--r--glnx-fdio.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/glnx-fdio.h b/glnx-fdio.h
index c0fd4e4..3ca1a66 100644
--- a/glnx-fdio.h
+++ b/glnx-fdio.h
@@ -21,6 +21,7 @@
#pragma once
#include <glnx-backport-autocleanups.h>
+#include <gio/gfiledescriptorbased.h>
#include <limits.h>
#include <dirent.h>
#include <sys/stat.h>
@@ -121,4 +122,9 @@ glnx_file_copy_at (int src_dfd,
GCancellable *cancellable,
GError **error);
+gboolean
+glnx_stream_fstat (GFileDescriptorBased *stream,
+ struct stat *stbuf,
+ GError **error);
+
G_END_DECLS