[Spice-commits] src/usbutil.c

Frediano Ziglio fziglio at kemper.freedesktop.org
Wed May 31 08:23:48 UTC 2017

 src/usbutil.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 52f2c33f8c945a6f6e578e07dd43ef3f22ecf73a
Author: Christophe de Dinechin <dinechin at redhat.com>
Date:   Tue May 30 14:52:49 2017 +0200

    Avoid warning about snprintf on non-Linux platforms
    Without #include <stdio.h>, calls to snprintf in the file
    cause a warning. The file <unistd.h> is left aside on purpose,
    since src/usbutil.c may be compiled on Windows where this
    file does not exist.
    Signed-off-by: Christophe de Dinechin <dinechin at redhat.com>
    Acked-by: Frediano Ziglio <fziglio at redhat.com>

diff --git a/src/usbutil.c b/src/usbutil.c
index b68a2e1..e96ab11 100644
--- a/src/usbutil.c
+++ b/src/usbutil.c
@@ -27,8 +27,8 @@
 #include <stdlib.h>
-#ifdef __linux__
 #include <stdio.h>
+#ifdef __linux__
 #include <unistd.h>
 #include <sys/sysmacros.h>
 #ifndef major /* major and minor macros were moved to sys/sysmacros.h from sys/types.h */

More information about the Spice-commits mailing list