packetdrill: pull upstream fix for fno-common toolchains (#141574)

* packetdrill: pull upstream fix for fno-common toolchains

Example toolchain is clang-12. The patch fixes the following
build failure:

$ nix-build -E 'with import ./. {}; packetdrill.override { stdenv = clang12Stdenv; }'
...
ld: libpacketdrill-lib.a(tcp_options_to_string.c.o):(.bss+0x0):
multiple definition of `tcp_option';
libpacketdrill-lib.a(run.c.o):(.bss+0x18): first defined here

authored by Sergei Trofimovich and committed by GitHub b91ec507 b0fcb832

+11 -1
+11 -1
pkgs/tools/networking/packetdrill/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub, bison, flex, cmake, libpcap }: 1 + { lib, stdenv, fetchFromGitHub, fetchpatch, bison, flex, cmake, libpcap }: 2 2 stdenv.mkDerivation rec { 3 3 pname = "packetdrill"; 4 4 version = "unstable-2020-08-22"; ··· 9 9 rev = "68a34fa73cf221e5f52d6fa4f203bcd93062be1b"; 10 10 sha256 = "0djkwb6l2959f44d98vwb092rghf0qmii8391vrpxqb99j6pv4h6"; 11 11 }; 12 + patches = [ 13 + # Upstream fix for -fno-common toolchains 14 + (fetchpatch { 15 + name = "fno-common.patch"; 16 + url = "https://github.com/google/packetdrill/commit/c08292838de81a71ee477d5bf9d95b1130a1292b.patch"; 17 + sha256 = "1irbar1zkydmgqb12r3xd80dwj2jfxnxayxpb4nmbma8xm7knb10"; 18 + stripLen = 3; 19 + }) 20 + ]; 21 + 12 22 setSourceRoot = '' 13 23 export sourceRoot=$(realpath */gtests/net/packetdrill) 14 24 '';