[gnome-builder/wip/gtk4-port] libide/foundry: start memfd at 0 position
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port] libide/foundry: start memfd at 0 position
- Date: Tue, 7 Jun 2022 18:45:26 +0000 (UTC)
commit 2d72f006e452e8e53c22a8fe666ee5ac37d9c378
Author: Christian Hergert <chergert redhat com>
Date: Tue Jun 7 11:42:11 2022 -0700
libide/foundry: start memfd at 0 position
In case the other side is reading from these, we always want them to be
at the 0 position so they can read the contents as they'd expect to.
src/libide/foundry/ide-foundry-global.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/src/libide/foundry/ide-foundry-global.c b/src/libide/foundry/ide-foundry-global.c
index cf0048bce..1051118ed 100644
--- a/src/libide/foundry/ide-foundry-global.c
+++ b/src/libide/foundry/ide-foundry-global.c
@@ -239,6 +239,9 @@ ide_foundry_bytes_to_memfd (GBytes *bytes,
return -1;
}
+ /* Make sure we are set at the start */
+ lseek (fd, SEEK_SET, 0);
+
return fd;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]