usbguard: fix build against gcc-13

Without the change build fails  on `staging-next` as:

    usbguard> In file included from src/Library/Base64.cpp:23:
    usbguard> src/Library/Base64.hpp:34:34: error: 'uint8_t' does not name a type
    usbguard>    34 |   std::string base64Encode(const uint8_t* buffer, size_t buflen);
    usbguard>       |                                  ^~~~~~~
    usbguard> src/Library/Base64.hpp:26:1: note: 'uint8_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
    usbguard>    25 | #include <string>
    usbguard>   +++ |+#include <cstdint>
    usbguard>    26 | #include <cstddef>

The change pulls in upstream fix.
This commit is contained in:
Sergei Trofimovich 2023-12-25 21:58:18 +00:00
parent f6ece27ed4
commit bd956879e8
2 changed files with 12 additions and 1 deletions

View file

@ -1,6 +1,7 @@
{ stdenv
, lib
, fetchFromGitHub
, fetchpatch
, autoreconfHook
, installShellFiles
, nixosTests
@ -32,6 +33,16 @@ stdenv.mkDerivation rec {
fetchSubmodules = true;
};
patches = [
# Pull upstream fix for gcc-13:
# https://github.com/USBGuard/usbguard/pull/586
(fetchpatch {
name = "gcc-13.patch";
url = "https://github.com/USBGuard/usbguard/commit/22b1e0897af977cc96af926c730ff948bd120bb5.patch";
hash = "sha256-yw0ZHcn6naHcsfsqdBB/aTgCwvEHecew/6HDmjyY2ZA=";
})
];
nativeBuildInputs = [
autoreconfHook
installShellFiles

View file

@ -28983,7 +28983,7 @@ with pkgs;
upscayl = callPackage ../applications/graphics/upscayl { };
usbguard = disable-warnings-if-gcc13 (callPackage ../os-specific/linux/usbguard { });
usbguard = callPackage ../os-specific/linux/usbguard { };
usbguard-notifier = callPackage ../os-specific/linux/usbguard-notifier { };