nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

ntp: fix build with gcc-14

configure fails with:
> conftest.c: In function 'main':
conftest.c:162:16: error: passing argument 1 of 'pthread_detach' makes integer from pointer without a cast [-Wint-conversion]

pthread_detach expects a pthread_t so provide it one with pthread_self()

+9
+9
pkgs/by-name/nt/ntp/package.nix
··· 2 2 stdenv, 3 3 lib, 4 4 fetchurl, 5 + autoreconfHook, 5 6 openssl, 6 7 perl, 7 8 pps-tools, ··· 18 17 hash = "sha256-z4TF8/saKVKElCYk2CP/+mNBROCWz8T5lprJjvX0aOU="; 19 18 }; 20 19 20 + # fix for gcc-14 compile failure 21 + postPatch = '' 22 + substituteInPlace sntp/m4/openldap-thread-check.m4 \ 23 + --replace-fail "pthread_detach(NULL)" "pthread_detach(pthread_self())" 24 + ''; 25 + 21 26 configureFlags = [ 22 27 "--sysconfdir=/etc" 23 28 "--localstatedir=/var" ··· 32 25 "--enable-ignore-dns-errors" 33 26 "--with-yielding-select=yes" 34 27 ] ++ lib.optional stdenv.hostPlatform.isLinux "--enable-linuxcaps"; 28 + 29 + nativeBuildInputs = [ autoreconfHook ]; 35 30 36 31 buildInputs = 37 32 [