Skip to contentSkip to conversation

vfio: Make buildable with MUSL runtime

PATCH Applied Philip Prindeville 4 participants 6 messages May 20, 2023 – May 23, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vfio: Make buildable with MUSL runtime

From: Philip Prindeville <[email protected]>

pread64() and pwrite64() are declared in <unistd.h> in MUSL and other (i.e. not glibc) C runtimes.

---
 drivers/bus/pci/linux/pci_vfio.c | 1 +
 1 file changed, 1 insertion(+)
drivers/bus/pci/linux/pci_vfio.c +1 -0
index fab3483d9f8108fafaff6d022cd41165d1ec5a61..fe83e1a04ec2e7a891425144be3e0aacecb24f09 100644
@@ -2,6 +2,7 @@
  * Copyright(c) 2010-2014 Intel Corporation
  */
 
+#include <unistd.h>
 #include <string.h>
 #include <fcntl.h>
 #include <linux/pci_regs.h>
Signature · 1 line
2.34.1
Acked-by on v1 1/1
#1 lore raw
Quoted 15 lines · Philip Prindeville

From: Philip Prindeville <[email protected]>

pread64() and pwrite64() are declared in <unistd.h> in MUSL and other (i.e. not glibc) C runtimes.

---
  drivers/bus/pci/linux/pci_vfio.c | 1 +
  1 file changed, 1 insertion(+)
drivers/bus/pci/linux/pci_vfio.c +0 -0
index fab3483d9f8108fafaff6d022cd41165d1ec5a61..fe83e1a04ec2e7a891425144be3e0aacecb24f09 100644

drivers/bus/pci/linux/pci_vfio.c line 8

Quoted 7 lines
drivers/bus/pci/linux/pci_vfio.c +1 -0
@@ -2,6 +2,7 @@
   * Copyright(c) 2010-2014 Intel Corporation
   */
 
+#include <unistd.h>
  #include <string.h>
  #include <fcntl.h>
  #include <linux/pci_regs.h>
Signature · 2 lines
Thanks,
Anatoly
#2 lore raw

22/05/2023 11:27, Burakov, Anatoly:

Quoted 8 lines · Philip Prindeville
Quoted 6 lines

From: Philip Prindeville <[email protected]>

pread64() and pwrite64() are declared in <unistd.h> in MUSL and other (i.e. not glibc) C runtimes.

It was "buildable" already, and I don't understand how. In any doubt, I've added Cc: [email protected] for backports.

Applied, thanks.

#3 lore raw
Quoted 11 lines · Thomas Monjalon

22/05/2023 11:27, Burakov, Anatoly:

Quoted 6 lines · Philip Prindeville
Quoted 5 lines

From: Philip Prindeville <[email protected]>

pread64() and pwrite64() are declared in <unistd.h> in MUSL and other (i.e. not glibc) C runtimes.

Quoted 9 lines
Quoted 2 lines
Quoted 1 line

It was "buildable" already, and I don't understand how. In any doubt, I've added Cc: [email protected] for backports.

Applied, thanks.

Yeah, it builds with glibc just fine. MUSL is another story...

#4 lore raw

23/05/2023 17:46, Philip Prindeville:

Quoted 11 lines
Quoted 11 lines · Thomas Monjalon

22/05/2023 11:27, Burakov, Anatoly:

Quoted 7 lines · Philip Prindeville
Quoted 6 lines

From: Philip Prindeville <[email protected]>

pread64() and pwrite64() are declared in <unistd.h> in MUSL and other (i.e. not glibc) C runtimes.

Quoted 8 lines
Quoted 6 lines
Quoted 1 line

It was "buildable" already, and I don't understand how. In any doubt, I've added Cc: [email protected] for backports.

Applied, thanks.

Yeah, it builds with glibc just fine. MUSL is another story...

It is also building on Alpine/musl.
I would like to understand why.
Do you have failure logs and versions?

#5 lore raw
Quoted 21 lines · Thomas Monjalon

23/05/2023 17:46, Philip Prindeville:

Quoted 16 lines
Quoted 16 lines · Thomas Monjalon

22/05/2023 11:27, Burakov, Anatoly:

Quoted 8 lines · Philip Prindeville
Quoted 6 lines

From: Philip Prindeville <[email protected]>

pread64() and pwrite64() are declared in <unistd.h> in MUSL and other (i.e. not glibc) C runtimes.

It was "buildable" already, and I don't understand how. In any doubt, I've added Cc: [email protected] for backports.

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

Applied, thanks.

Yeah, it builds with glibc just fine. MUSL is another story...

It is also building on Alpine/musl.
I would like to understand why.
Do you have failure logs and versions?

Have a look at:

https://github.com/k13132/openwrt-dpdk/pull/9#issuecomment-1556124647