Applied, thanks!
Milos Nikic, le jeu. 02 avril 2026 10:48:17 -0700, a ecrit:
> Add missing standard and Mach/Hurd headers to resolve implicit
> function declarations, ensuring compatibility with stricter modern
> compilers (e.g., GCC 14+).
>
> Remove <string.h> and 'startup_S.h' as they are no longer used
> in this file, reducing namespace pollution.
>
> Finally, add explicit (void *) casts to the out-parameters of
> ports_create_port() to silence -Wincompatible-pointer-types
> warnings during compilation.
> ---
> libdiskfs/init-startup.c | 20 ++++++++++++++++----
> 1 file changed, 16 insertions(+), 4 deletions(-)
>
> diff --git a/libdiskfs/init-startup.c b/libdiskfs/init-startup.c
> index e7225c22..997429b3 100644
> --- a/libdiskfs/init-startup.c
> +++ b/libdiskfs/init-startup.c
> @@ -21,15 +21,27 @@
>
> #include "priv.h"
> #include <stdio.h>
> -#include <string.h>
> +#include <stdlib.h>
> #include <fcntl.h>
> #include <error.h>
> +#include <errno.h>
> +#include <mach_init.h>
> +#include <mach/task_special_ports.h>
> +#include <mach/message.h>
> +#include <mach/port.h>
> +#include <mach.h>
> +#include <sys/stat.h>
> +#include <hurd.h>
> #include <hurd/fsys.h>
> #include <hurd/paths.h>
> +#include <hurd/process.h>
> #include <hurd/startup.h>
> +#include <hurd/hurd_types.h>
> +#include <libports/ports.h>
> +#include <libdiskfs/diskfs.h>
> #include <assert-backtrace.h>
> +#include <pthread.h>
>
> -#include "startup_S.h"
>
> char *_diskfs_chroot_directory;
>
> @@ -42,7 +54,7 @@ diskfs_call_fsys_startup (mach_port_t bootstrap, int flags,
> mach_port_t right;
>
> err = ports_create_port (diskfs_control_class, diskfs_port_bucket,
> - sizeof (struct port_info), &newpi);
> + sizeof (struct port_info), (void *)&newpi);
> if (! err)
> {
> right = ports_get_send_right (newpi);
> @@ -208,7 +220,7 @@ _diskfs_init_completed (void)
>
> err = ports_create_port (diskfs_shutdown_notification_class,
> diskfs_port_bucket, sizeof (struct port_info),
> - &pi);
> + (void *)&pi);
> if (err)
> goto errout;
>
> --
> 2.53.0
>
--
Samuel
Now, it we had this sort of thing:
yield -a for yield to all traffic
yield -t for yield to trucks
yield -f for yield to people walking (yield foot)
yield -d t* for yield on days starting with t
...you'd have a lot of dead people at intersections, and traffic jams you
wouldn't believe...
(Discussion in comp.os.linux.misc on the intuitiveness of commands.)