diff mbox

[v2] tools/libxc: Fix build error when using xc_version_len

Message ID 1459423530-4057-1-git-send-email-olaf@aepfle.de (mailing list archive)
State New, archived
Headers show

Commit Message

Olaf Hering March 31, 2016, 11:25 a.m. UTC
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")

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
---
v2:
  use correct summary

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

Comments

Konrad Rzeszutek Wilk March 31, 2016, 2:23 p.m. UTC | #1
On Thu, Mar 31, 2016 at 01:25:30PM +0200, Olaf Hering wrote:
> 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.

> 
> Fixes d275ec9 ("libxc/libxl/python/xenstat/ocaml: Use new XEN_VERSION
> hypercall")
> 
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> Cc: Wei Liu <wei.liu2@citrix.com>
> ---
> v2:
>   use correct summary
> 
>  tools/libxc/include/xenctrl.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include/xenctrl.h
> index a9e4dc1..2140702 100644
> --- a/tools/libxc/include/xenctrl.h
> +++ b/tools/libxc/include/xenctrl.h
> @@ -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
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
Olaf Hering March 31, 2016, 2:33 p.m. UTC | #2
On Thu, Mar 31, Konrad Rzeszutek Wilk wrote:

> On Thu, Mar 31, 2016 at 01:25:30PM +0200, Olaf Hering wrote:
> > 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
Wei Liu April 1, 2016, 1:47 p.m. UTC | #3
On Thu, Mar 31, 2016 at 01:25:30PM +0200, Olaf Hering wrote:
> 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")
> 
> Signed-off-by: Olaf Hering <olaf@aepfle.de>
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> Cc: Wei Liu <wei.liu2@citrix.com>

Acked-by: Wei Liu <wei.liu2@citrix.com>

> ---
> v2:
>   use correct summary
> 

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

>  tools/libxc/include/xenctrl.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include/xenctrl.h
> index a9e4dc1..2140702 100644
> --- a/tools/libxc/include/xenctrl.h
> +++ b/tools/libxc/include/xenctrl.h
> @@ -27,6 +27,7 @@
>  #define __XEN_TOOLS__ 1
>  #endif
>  
> +#include <unistd.h>
>  #include <stddef.h>
>  #include <stdint.h>
>  #include <stdio.h>
Ian Jackson April 1, 2016, 1:50 p.m. UTC | #4
Olaf Hering writes ("[PATCH v2] tools/libxc: Fix build error when using xc_version_len"):
> 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"):
> 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.

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

Ian.
Olaf Hering April 1, 2016, 3:29 p.m. UTC | #5
On Fri, Apr 01, Ian Jackson wrote:

> Olaf Hering writes ("[PATCH v2] tools/libxc: Fix build error when using xc_version_len"):
> > 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"):
> > 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.
> 
> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

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

Olaf
diff mbox

Patch

diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include/xenctrl.h
index a9e4dc1..2140702 100644
--- a/tools/libxc/include/xenctrl.h
+++ b/tools/libxc/include/xenctrl.h
@@ -27,6 +27,7 @@ 
 #define __XEN_TOOLS__ 1
 #endif
 
+#include <unistd.h>
 #include <stddef.h>
 #include <stdint.h>
 #include <stdio.h>