diff options
-rw-r--r-- | pkgs/mcping/0002-fix-sign-compare.patch | 13 | ||||
-rw-r--r-- | pkgs/mcping/default.nix | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/pkgs/mcping/0002-fix-sign-compare.patch b/pkgs/mcping/0002-fix-sign-compare.patch new file mode 100644 index 0000000..bfdf3c5 --- /dev/null +++ b/pkgs/mcping/0002-fix-sign-compare.patch @@ -0,0 +1,13 @@ +diff --git a/mcping.c b/mcping.c +index 44333a5..99c26c8 100644 +--- a/mcping.c ++++ b/mcping.c +@@ -279,7 +279,7 @@ int main(int argc, char **argv) { + freeaddrinfo(result); + + len = build_handshake(handshake, argv[1], port); +- if (send(sfd, handshake, len, 0) != len) { ++ if (send(sfd, handshake, len, 0) != (ssize_t)len) { + fprintf(stderr, "Failed to send handshake\n"); + return EXIT_FAILURE; + } diff --git a/pkgs/mcping/default.nix b/pkgs/mcping/default.nix index f72f064..11892e8 100644 --- a/pkgs/mcping/default.nix +++ b/pkgs/mcping/default.nix @@ -16,6 +16,7 @@ stdenv.mkDerivation rec { patches = [ ./0001-print-usage-to-stderr.patch + ./0002-fix-sign-compare.patch ]; buildPhase = '' cc -o mcping -Wall -Wextra mcping.c |