summary refs log tree commit diff
path: root/pkgs/development/libraries/usbredir
diff options
context:
space:
mode:
authorTuomas Tynkkynen <tuomas@tuxera.com>2016-09-30 12:18:33 +0300
committerTuomas Tynkkynen <tuomas@tuxera.com>2016-09-30 12:19:59 +0300
commitb3af42011bcb86ff43a59453b071e5a4ca3b5319 (patch)
tree5308d67612721df5ce6bff455a649c11fe11c1ae /pkgs/development/libraries/usbredir
parentbd05f4ff6da45d317fcac4e73713446c7b1609bb (diff)
downloadnixpkgs-b3af42011bcb86ff43a59453b071e5a4ca3b5319.tar
nixpkgs-b3af42011bcb86ff43a59453b071e5a4ca3b5319.tar.gz
nixpkgs-b3af42011bcb86ff43a59453b071e5a4ca3b5319.tar.bz2
nixpkgs-b3af42011bcb86ff43a59453b071e5a4ca3b5319.tar.lz
nixpkgs-b3af42011bcb86ff43a59453b071e5a4ca3b5319.tar.xz
nixpkgs-b3af42011bcb86ff43a59453b071e5a4ca3b5319.tar.zst
nixpkgs-b3af42011bcb86ff43a59453b071e5a4ca3b5319.zip
usbredir: Fix 32-bit build
Avoid these warnings from being errors:

usbredirhost.c: In function 'usbredirhost_can_write_iso_package':
usbredirhost.c:1023:19: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'uint64_t {aka long long unsigned int}' [-Wformat=]
             DEBUG("START dropping isoc packets %lu buffer > %lu hi threshold",
                   ^
usbredirhost.c:1023:19: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'uint64_t {aka long long unsigned int}' [-Wformat=]
             DEBUG("START dropping isoc packets %lu buffer > %lu hi threshold",
                   ^
usbredirhost.c:1028:19: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'uint64_t {aka long long unsigned int}' [-Wformat=]
             DEBUG("STOP dropping isoc packets %lu buffer < %lu low threshold",
                   ^
usbredirhost.c:1028:19: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'uint64_t {aka long long unsigned int}' [-Wformat=]
             DEBUG("STOP dropping isoc packets %lu buffer < %lu low threshold",
                   ^
usbredirhost.c: In function 'usbredirhost_set_iso_threshold':
usbredirhost.c:1162:11: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'uint64_t {aka long long unsigned int}' [-Wformat=]
     DEBUG("higher threshold is %lu bytes | lower threshold is %lu bytes",
           ^
usbredirhost.c:1162:11: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'uint64_t {aka long long unsigned int}' [-Wformat=]
     DEBUG("higher threshold is %lu bytes | lower threshold is %lu bytes",

I think in all of these cases, the incorrect format modifier just causes
wrong debug prints on i686.
Diffstat (limited to 'pkgs/development/libraries/usbredir')
-rw-r--r--pkgs/development/libraries/usbredir/default.nix3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkgs/development/libraries/usbredir/default.nix b/pkgs/development/libraries/usbredir/default.nix
index a115c93c90e..76912f19ab5 100644
--- a/pkgs/development/libraries/usbredir/default.nix
+++ b/pkgs/development/libraries/usbredir/default.nix
@@ -9,6 +9,9 @@ stdenv.mkDerivation rec {
     sha256 = "1wsnmk4wjpdhbn1zaxg6bmyxspcki2zgy0am9lk037rnl4krwzj0";
   };
 
+  # Works around bunch of "format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'uint64_t {aka long long unsigned int}'" warnings
+  NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isi686 "-Wno-error=format";
+
   buildInputs = [ pkgconfig libusb ];
   propagatedBuildInputs = [ libusb ];