libimobiledevice: pull upstream fix for clang-16 support

Without the change the build fails on `clang-16` and upcoming `gcc-14`
as:

    $ nix build --impure --expr 'with import ./. {}; libimobiledevice.override { stdenv = clangStdenv; }' -L
    ...
    libimobiledevice> #define __usleep(x) usleep(x)
    libimobiledevice>                     ^
    libimobiledevice> idevicedevmodectl.c:416:6: error: call to undeclared function 'usleep'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
This commit is contained in:
Sergei Trofimovich 2023-12-01 16:21:08 +00:00
parent 3ca25cf885
commit fbc7955d72

View File

@ -1,6 +1,7 @@
{ lib { lib
, stdenv , stdenv
, fetchFromGitHub , fetchFromGitHub
, fetchpatch
, autoreconfHook , autoreconfHook
, pkg-config , pkg-config
, openssl , openssl
@ -26,6 +27,16 @@ stdenv.mkDerivation rec {
hash = "sha256-mIsB+EaGJlGMOpz3OLrs0nAmhOY1BwMs83saFBaejwc="; hash = "sha256-mIsB+EaGJlGMOpz3OLrs0nAmhOY1BwMs83saFBaejwc=";
}; };
patches = [
# Pull upstream fix for clang-16 and upcoming gcc-14 support:
# https://github.com/libimobiledevice/libimobiledevice/pull/1444
(fetchpatch {
name = "usleep-decl.patch";
url = "https://github.com/libimobiledevice/libimobiledevice/commit/db623184c0aa09c27697f5a2e81025db223075d5.patch";
hash = "sha256-TgdgBkEDXzQDSgJxcZc+pZncfmBVXarhHOByGFs6p0Q=";
})
];
nativeBuildInputs = [ nativeBuildInputs = [
autoreconfHook autoreconfHook
pkg-config pkg-config