bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Hurd: use mach_msg_type_number_t for file_get_fs_options since i


From: Flavio Cruz
Subject: [PATCH] Hurd: use mach_msg_type_number_t for file_get_fs_options since its size is not the same as size_t for x86_64.
Date: Mon, 15 Jul 2024 15:37:11 +0100

This fixes an incompatible-pointer-types error on GCC14.
---
 ifconfig/system/hurd.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/ifconfig/system/hurd.c b/ifconfig/system/hurd.c
index 6ef63a7a..38e0060c 100644
--- a/ifconfig/system/hurd.c
+++ b/ifconfig/system/hurd.c
@@ -48,6 +48,7 @@ check_driving (const char *name)
 
   char *argz = 0, *new_argz = 0;
   size_t argz_len = 0;
+  mach_msg_type_number_t argz_len_for_fs_get_options = 0;
   char *entry = 0;
   const char *socket = _SERVERS_SOCKET "/2";
 
@@ -64,7 +65,14 @@ check_driving (const char *name)
       return 0;
     }
 
-  file_get_fs_options (node, &argz, &argz_len);
+  err = file_get_fs_options (node, &argz, &argz_len_for_fs_get_options);
+  if (err)
+    {
+      error (0, err, "Could not get fs options of %s", socket);
+      return 0;
+    }
+
+  argz_len = argz_len_for_fs_get_options;
 
   for (entry = argz; entry; entry = argz_next (argz, argz_len, entry))
     {
-- 
2.45.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]