diff mbox series

Fix non-Linux build

Message ID 38a635d8-c129-4bcf-a274-af36d928263b@inlv.org (mailing list archive)
State Accepted
Delegated to: Herbert Xu
Headers show
Series Fix non-Linux build | expand

Commit Message

Martijn Dekker May 12, 2024, 9:02 p.m. UTC
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.

Comments

Herbert Xu May 18, 2024, 12:39 a.m. UTC | #1
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.
diff mbox series

Patch

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 */