untie: fix build with gcc14

- add patch that adds `#define _GNU_SOURCE` to `untie.c`, as glibc
wrapper over clone syscall is not declared otherwise.
Fixes `-Wimplicit-function-declaration` error:
```
untie.c:411:15: error: implicit declaration of function 'clone';
did you mean 'close'? []
  411 |         ret = clone(child_process, &stack[STACK_SIZE - 1], flags, &args_info);
      |               ^~~~~
      |               close
make: *** [<builtin>: untie.o] Error 1
```
This commit is contained in:
ghpzin
2025-03-30 15:23:34 +03:00
parent 22148ead7b
commit b0f202003e
2 changed files with 17 additions and 0 deletions
@@ -0,0 +1,12 @@
diff --git a/untie.c b/untie.c
index f08a10d..d3d20b4 100644
--- a/untie.c
+++ b/untie.c
@@ -18,6 +18,7 @@
* Copyright (c) 2006, 2007 Guillaume Chazarain <guichaz@yahoo.fr>
*/
+#define _GNU_SOURCE
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/wait.h>
+5
View File
@@ -12,6 +12,11 @@ stdenv.mkDerivation rec {
sha256 = "1334ngvbi4arcch462mzi5vxvxck4sy1nf0m58116d9xmx83ak0m";
};
patches = [
# fix build with gcc14
./add-define-gnu-source.patch
];
makeFlags = [ "PREFIX=$(out)" ];
meta = with lib; {