Skip to contentSkip to conversation

tools/libxc: Fix build error when using xc_version_len

PATCH In review Olaf Hering 5 participants 9 messages Mar 31, 2016 – Apr 1, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 tools/libxc: Fix build error when using xc_version_len

Tools fails to build with gcc 4.5, it does not provide ssize_t.

Fixes d275ec9 ("libxc/libxl/python/xenstat/ocaml: Use new XEN_VERSION hypercall")

---
v2:
use correct summary

 tools/libxc/include/xenctrl.h | 1 +
 1 file changed, 1 insertion(+)
tools/libxc/include/xenctrl.h +1 -0
index a9e4dc1..2140702 100644
@@ -27,6 +27,7 @@
 #define __XEN_TOOLS__ 1
 #endif
 
+#include <unistd.h>
 #include <stddef.h>
 #include <stdint.h>
 #include <stdio.h>

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#1 lore raw
Quoted 1 line · Olaf Hering

Tools fails to build with gcc 4.5, it does not provide ssize_t.

Which version of SLES/OpenSuSE had that? I had been using 4.4.4 and 5.3 and the compiler didn't hit that.

Quoted 27 lines

Fixes d275ec9 ("libxc/libxl/python/xenstat/ocaml: Use new XEN_VERSION hypercall")

---
v2:
use correct summary

 tools/libxc/include/xenctrl.h | 1 +
 1 file changed, 1 insertion(+)
tools/libxc/include/xenctrl.h +1 -0
index a9e4dc1..2140702 100644
@@ -27,6 +27,7 @@
 #define __XEN_TOOLS__ 1
 #endif
 
+#include <unistd.h>
 #include <stddef.h>
 #include <stdint.h>
 #include <stdio.h>
Quoted 4 lines

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#2 lore raw
Quoted 5 lines · Konrad Rzeszutek Wilk
Quoted 1 line · Olaf Hering

Tools fails to build with gcc 4.5, it does not provide ssize_t.

Which version of SLES/OpenSuSE had that? I had been using 4.4.4 and 5.3 and the compiler didn't hit that.

SLE11 and openSUSE 11.4. Perhaps its a matter of CFLAGS:

https://build.opensuse.org/package/show/home:olh:xen-unstable/xen

Olaf

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

Acked-by on v2 1/1
#3 lore raw
In reply to Olaf Hering
Quoted 8 lines · Olaf Hering

Tools fails to build with gcc 4.5, it does not provide ssize_t.

Fixes d275ec9 ("libxc/libxl/python/xenstat/ocaml: Use new XEN_VERSION hypercall")

Quoted 4 lines

---
v2:
use correct summary

Oh, I guessed I missed the subject line when acking v1.

Quoted 8 lines
 tools/libxc/include/xenctrl.h | 1 +
 1 file changed, 1 insertion(+)
tools/libxc/include/xenctrl.h +0 -0
index a9e4dc1..2140702 100644

tools/libxc/include/xenctrl.h line 33

Quoted 7 lines
tools/libxc/include/xenctrl.h +1 -0
@@ -27,6 +27,7 @@
 #define __XEN_TOOLS__ 1
 #endif
 
+#include <unistd.h>
 #include <stddef.h>
 #include <stdint.h>
 #include <stdio.h>

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

Acked-by on v2 1/1
#4 lore raw

Re: [PATCH v2] tools/libxc: Fix build error when using xc_version_len [and 2 more messages]

In reply to Olaf Hering

Olaf Hering writes ("[PATCH v2] tools/libxc: Fix build error when using xc_version_len"):

Quoted 1 line

Tools fails to build with gcc 4.5, it does not provide ssize_t.

Changlong Xie writes ("[PATCH] tools: add missing header for xenctrl.h"):

Quoted 2 lines

Commit d275ec9c introduce ssize_t but not include relevant header, it will cause compile errors just like below:

Thanks for this. I have applied Olaf's version of this patch.

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#5 lore raw

Re: [PATCH v2] tools/libxc: Fix build error when using xc_version_len [and 2 more messages]

Quoted 10 lines · Ian Jackson

Olaf Hering writes ("[PATCH v2] tools/libxc: Fix build error when using xc_version_len"):

Quoted 1 line

Tools fails to build with gcc 4.5, it does not provide ssize_t.

Changlong Xie writes ("[PATCH] tools: add missing header for xenctrl.h"):

Quoted 2 lines

Commit d275ec9c introduce ssize_t but not include relevant header, it will cause compile errors just like below:

Thanks for this. I have applied Olaf's version of this patch.

d1da3d1:tools/libxc/include/xenctrl.h has now two #include unistd.h

Olaf

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#6 lore raw

PATCH 1/1 tools: add missing header for xenctrl.h

Commit d275ec9c introduce ssize_t but not include relevant header, it will cause compile errors just like below:

./include/xenctrl.h:1485: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'xc_version_len'

---
 tools/libxc/include/xenctrl.h | 1 +
 1 file changed, 1 insertion(+)
tools/libxc/include/xenctrl.h +1 -0
index a9e4dc1..fb5c26c 100644
@@ -31,6 +31,7 @@
 #include <stdint.h>
 #include <stdio.h>
 #include <stdbool.h>
+#include <unistd.h>
 #include <xen/xen.h>
 #include <xen/domctl.h>
 #include <xen/physdev.h>
Signature · 9 lines
1.9.3




_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
#7 lore raw

Re: [PATCH] tools: add missing header for xenctrl.h

My build machine is

master:/etc # cat SuSE-release
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 3

You may not to reproduce the same errors on fedora or some other platforms.

Quoted 18 lines · Changlong Xie

Commit d275ec9c introduce ssize_t but not include relevant header, it will cause compile errors just like below:

./include/xenctrl.h:1485: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'xc_version_len'

---
  tools/libxc/include/xenctrl.h | 1 +
  1 file changed, 1 insertion(+)
tools/libxc/include/xenctrl.h +0 -0
index a9e4dc1..fb5c26c 100644

tools/libxc/include/xenctrl.h line 37

Quoted 7 lines
tools/libxc/include/xenctrl.h +1 -0
@@ -31,6 +31,7 @@
  #include <stdint.h>
  #include <stdio.h>
  #include <stdbool.h>
+#include <unistd.h>
  #include <xen/xen.h>
  #include <xen/domctl.h>
  #include <xen/physdev.h>

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#8 lore raw

Re: [PATCH] tools: add missing header for xenctrl.h

Quoted 9 lines · Changlong Xie

My build machine is

master:/etc # cat SuSE-release
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 3

You may not to reproduce the same errors on fedora or some other platforms.

Olaf posted a similar patch yesterday.

This issue will be fixed soon.

Wei.

Quoted 13 lines · Changlong Xie
Quoted 12 lines

Commit d275ec9c introduce ssize_t but not include relevant header, it will cause compile errors just like below:

./include/xenctrl.h:1485: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'xc_version_len'

---
 tools/libxc/include/xenctrl.h | 1 +
 1 file changed, 1 insertion(+)
Quoted 15 lines

tools/libxc/include/xenctrl.h line 37

Quoted 13 lines
tools/libxc/include/xenctrl.h +1 -0
index a9e4dc1..fb5c26c 100644
@@ -31,6 +31,7 @@
 #include <stdint.h>
 #include <stdio.h>
 #include <stdbool.h>
+#include <unistd.h>
 #include <xen/xen.h>
 #include <xen/domctl.h>
 #include <xen/physdev.h>

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel