Merge pull request #176013 from djahandarie/master

mwprocapture: fix compile on new GCC and new linux kernel

authored by

Artturi and committed by
GitHub
20dcc692 add94b83

+24
+4
pkgs/os-specific/linux/mwprocapture/default.nix
··· 33 33 "KERNELDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" 34 34 ]; 35 35 36 + patches = [ ./pci.patch ]; 37 + 38 + NIX_CFLAGS_COMPILE="-Wno-error=implicit-fallthrough"; 39 + 36 40 postInstall = '' 37 41 cd ../ 38 42 mkdir -p $out/bin
+20
pkgs/os-specific/linux/mwprocapture/pci.patch
··· 1 + diff --git a/src/sources/avstream/capture.c b/src/sources/avstream/capture.c 2 + index f5d256d..a104f62 100644 3 + --- a/src/sources/avstream/capture.c 4 + +++ b/src/sources/avstream/capture.c 5 + @@ -288,12 +288,12 @@ static int xi_cap_probe(struct pci_dev *pdev, const struct pci_device_id *ent) 6 + } 7 + 8 + if ((sizeof(dma_addr_t) > 4) && 9 + - !pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) { 10 + + !dma_set_mask(&pdev->dev, DMA_BIT_MASK(64))) { 11 + xi_debug(1, "dma 64 OK!\n"); 12 + } else { 13 + xi_debug(1, "dma 64 not OK!\n"); 14 + - if ((pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) < 0) && 15 + - (pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) < 0) { 16 + + if ((dma_set_mask(&pdev->dev, DMA_BIT_MASK(64)) < 0) && 17 + + (dma_set_mask(&pdev->dev, DMA_BIT_MASK(32))) < 0) { 18 + xi_debug(0, "DMA configuration failed\n"); 19 + goto disable_pci; 20 + }