untie: fix build with gcc14, modernize (#394593)

This commit is contained in:
7c6f434c
2025-03-30 13:17:38 +00:00
committed by GitHub
2 changed files with 24 additions and 7 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>
+12 -7
View File
@@ -4,22 +4,27 @@
fetchurl,
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "untie";
version = "0.3";
src = fetchurl {
url = "http://guichaz.free.fr/untie/files/${pname}-${version}.tar.bz2";
url = "http://guichaz.free.fr/untie/files/${finalAttrs.pname}-${finalAttrs.version}.tar.bz2";
sha256 = "1334ngvbi4arcch462mzi5vxvxck4sy1nf0m58116d9xmx83ak0m";
};
patches = [
# fix build with gcc14
./add-define-gnu-source.patch
];
makeFlags = [ "PREFIX=$(out)" ];
meta = with lib; {
meta = {
description = "Tool to run processes untied from some of the namespaces";
mainProgram = "untie";
maintainers = with maintainers; [ raskin ];
platforms = platforms.linux;
license = licenses.gpl2Plus;
maintainers = with lib.maintainers; [ raskin ];
platforms = lib.platforms.linux;
license = lib.licenses.gpl2Plus;
};
passthru = {
@@ -27,4 +32,4 @@ stdenv.mkDerivation rec {
downloadPage = "http://guichaz.free.fr/untie";
};
};
}
})