Unverified Commit f7beb2d3 authored by 7c6f434c's avatar 7c6f434c Committed by GitHub
Browse files

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

parents 137102f2 05a52a2a
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
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
Original line number Diff line number Diff line
@@ -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";
    };
  };
}
})