Unverified Commit 4ab1f1f1 authored by Aleksana's avatar Aleksana Committed by GitHub
Browse files

popa3d: fix build on GCC 14 (#402898)

parents 0d8f1f8d a0cd45af
Loading
Loading
Loading
Loading
+22 −10
Original line number Diff line number Diff line
@@ -4,22 +4,18 @@
  fetchurl,
  openssl,
  libxcrypt,
  versionCheckHook,
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
  pname = "popa3d";
  version = "1.0.3";

  src = fetchurl {
    url = "http://www.openwall.com/popa3d/${pname}-${version}.tar.gz";
    sha256 = "1g48cd74sqhl496wmljhq44iyfpghaz363a1ip8nyhpjz7d57f03";
    url = "http://www.openwall.com/popa3d/popa3d-${finalAttrs.version}.tar.gz";
    hash = "sha256-A7hT2vnyQm/RjUENM76C7zofCcFQ0spNIhRiTU5jiLw=";
  };

  buildInputs = [
    openssl
    libxcrypt
  ];

  patches = [
    ./fix-mail-spool-path.patch
    ./use-openssl.patch
@@ -27,7 +23,23 @@ stdenv.mkDerivation rec {
    ./enable-standalone-mode.patch
  ];

  configurePhase = ''makeFlags="PREFIX=$out MANDIR=$out/share/man"'';
  enableParallelBuilding = true;

  makeFlags = [
    "PREFIX=$(out)"
    "MANDIR=$(out)/share/man"
  ];

  buildInputs = [
    openssl
    libxcrypt
  ];

  nativeInstallCheckInputs = [
    versionCheckHook
  ];
  doInstallCheck = true;
  versionCheckProgramArg = "-V";

  meta = {
    homepage = "http://www.openwall.com/popa3d/";
@@ -35,4 +47,4 @@ stdenv.mkDerivation rec {
    mainProgram = "popa3d";
    platforms = lib.platforms.linux;
  };
}
})
+13 −0
Original line number Diff line number Diff line
@@ -10,3 +10,16 @@ diff -ubr popa3d-1.0.2-orig/Makefile popa3d-1.0.2/Makefile
 # HP-UX trusted system
 #LIBS += -lsec
 # Solaris (POP_STANDALONE, POP_VIRTUAL)
diff -ubr popa3d-1.0.2-orig/auth_shadow.c popa3d-1.0.2/auth_shadow.c
--- a/auth_shadow.c
+++ b/auth_shadow.c
@@ -14,8 +14,9 @@
 #define _XOPEN_SOURCE 4
 #define _XOPEN_SOURCE_EXTENDED
 #define _XOPEN_VERSION 4
 #define _XPG4_2
+#define _DEFAULT_SOURCE
 #include <unistd.h>
 #include <string.h>
 #include <stdlib.h>
 #include <pwd.h>