Unverified Commit 74f0c2d4 authored by h7x4's avatar h7x4 Committed by GitHub
Browse files

xbps: fix build with gcc 14 (#388558)

parents 11e9d686 6420a2c2
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -44,6 +44,10 @@ stdenv.mkDerivation rec {
      --replace 'define _BSD_SOURCE' 'define _DEFAULT_SOURCE' \
      --replace '# define _BSD_SOURCE' '#define _DEFAULT_SOURCE'

    # fix calloc argument cause a build failure
    substituteInPlace bin/xbps-fbulk/main.c \
      --replace-fail 'calloc(sizeof(*depn), 1)' 'calloc(1UL, sizeof(*depn))'

    # fix unprefixed ranlib (needed on cross)
    substituteInPlace lib/Makefile \
      --replace 'SILENT}ranlib ' 'SILENT}$(RANLIB) '