Re: sys/compat/linux/linux_emul.h:58:49: error: declaration of, 'struct image_args' will not be visible . . .

From: Michael Tuexen <tuexen_at_FreeBSD.org>
Date: Sun, 16 Aug 2026 21:29:33 UTC

> On 16. Aug 2026, at 22:23, Mark Millard <marklmi@yahoo.com> wrote:
> 
> Is the Discord kernel channel monitored for the likes of the following
> report there (not my report)? :
> 
> QUOTE
> Failing since yesterday on arm64:
> ```
> sys/compat/linux/linux_emul.h:58:49: error: declaration of
> 'struct image_args' will not be visible outside of this function
> [-Werror,-Wvisibility]
>   58 | int     linux_common_execve(struct thread *, struct image_args*);
>      |                                                     ^
> 1 error generated.
> ```
> END QUOTE
Hi Mark,

I reported it already to Devin. The culprit is
https://cgit.FreeBSD.org/src/commit/?id=bdb561843e865eaa5bbdc5394ed9d9c91136240c


The following patch
diff --git a/sys/arm64/linux/linux_emul_md.c b/sys/arm64/linux/linux_emul_md.c
index 9dd507ad4f49..e55d3b712056 100644
--- a/sys/arm64/linux/linux_emul_md.c
+++ b/sys/arm64/linux/linux_emul_md.c
@@ -7,6 +7,7 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/proc.h>
+#include <sys/imgact.h>
  #include <compat/linux/linux_emul.h>
#include <compat/linux/linux_mmap.h>

fixes it for me.

Best regards
Michael
> -- 
> ===
> Mark Millard
> marklmi at yahoo.com
> 
>