public inbox for dash@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix non-Linux build
@ 2024-05-12 21:02 Martijn Dekker
  2024-05-18  0:39 ` Herbert Xu
  0 siblings, 1 reply; 2+ messages in thread
From: Martijn Dekker @ 2024-05-12 21:02 UTC (permalink / raw)
  To: DASH shell mailing list

As of 509f5b0d, the build fails on Darwin/macOS, which does not have 
memfd_create(2). The build fails on redir.c because the fallback for 
memfd_create, which is defined in system.h, is not included. Presumably it is 
the same on other systems without memfd_create.

diff --git a/src/redir.c b/src/redir.c
index 2505d49..8a77a92 100644
--- a/src/redir.c
+++ b/src/redir.c
@@ -57,6 +57,7 @@
  #include "memalloc.h"
  #include "error.h"
  #include "trap.h"
+#include "system.h"


  #define EMPTY -2		/* marks an unused slot in redirtab */

-- 
||	modernish -- harness the shell
||	https://github.com/modernish/modernish
||
||	KornShell lives!
||	https://github.com/ksh93/ksh

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix non-Linux build
  2024-05-12 21:02 [PATCH] Fix non-Linux build Martijn Dekker
@ 2024-05-18  0:39 ` Herbert Xu
  0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2024-05-18  0:39 UTC (permalink / raw)
  To: Martijn Dekker; +Cc: dash

Martijn Dekker <martijn@inlv.org> wrote:
> As of 509f5b0d, the build fails on Darwin/macOS, which does not have 
> memfd_create(2). The build fails on redir.c because the fallback for 
> memfd_create, which is defined in system.h, is not included. Presumably it is 
> the same on other systems without memfd_create.
> 
> diff --git a/src/redir.c b/src/redir.c
> index 2505d49..8a77a92 100644
> --- a/src/redir.c
> +++ b/src/redir.c
> @@ -57,6 +57,7 @@
>  #include "memalloc.h"
>  #include "error.h"
>  #include "trap.h"
> +#include "system.h"

The patch was white-space damaged but I applied it by hand.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-05-18  0:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-12 21:02 [PATCH] Fix non-Linux build Martijn Dekker
2024-05-18  0:39 ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox