[libvirt] [PATCH] lxc: include sys/{types,stat}.h

This fixes the build on Debian Wheezy which otherwise fails with: CC libvirt_driver_lxc_impl_la-lxc_process.lo lxc/lxc_process.c: In function 'virLXCProcessGetNsInode': lxc/lxc_process.c:648:5: error: implicit declaration of function 'stat' [-Werror=implicit-function-declaration] lxc/lxc_process.c:648:5: error: nested extern declaration of 'stat' [-Werror=nested-externs] cc1: all warnings being treated as errors --- src/lxc/lxc_process.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index 0d5a070..ecfac50 100644 --- a/src/lxc/lxc_process.c +++ b/src/lxc/lxc_process.c @@ -21,6 +21,8 @@ #include <config.h> +#include <sys/types.h> +#include <sys/stat.h> #include <unistd.h> #include <fcntl.h> #include <signal.h> -- 1.7.10.4

On 03/08/2013 09:40 AM, Guido Günther wrote:
This fixes the build on Debian Wheezy which otherwise fails with:
CC libvirt_driver_lxc_impl_la-lxc_process.lo lxc/lxc_process.c: In function 'virLXCProcessGetNsInode': lxc/lxc_process.c:648:5: error: implicit declaration of function 'stat' [-Werror=implicit-function-declaration] lxc/lxc_process.c:648:5: error: nested extern declaration of 'stat' [-Werror=nested-externs] cc1: all warnings being treated as errors --- src/lxc/lxc_process.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index 0d5a070..ecfac50 100644 --- a/src/lxc/lxc_process.c +++ b/src/lxc/lxc_process.c @@ -21,6 +21,8 @@
#include <config.h>
+#include <sys/types.h>
Pointless. POSIX guarantees that headers are self-contained without needing <sys/types.h>.
+#include <sys/stat.h>
Required - ACK to this one line addition. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On Fri, Mar 08, 2013 at 11:02:47AM -0700, Eric Blake wrote:
On 03/08/2013 09:40 AM, Guido Günther wrote:
This fixes the build on Debian Wheezy which otherwise fails with:
CC libvirt_driver_lxc_impl_la-lxc_process.lo lxc/lxc_process.c: In function 'virLXCProcessGetNsInode': lxc/lxc_process.c:648:5: error: implicit declaration of function 'stat' [-Werror=implicit-function-declaration] lxc/lxc_process.c:648:5: error: nested extern declaration of 'stat' [-Werror=nested-externs] cc1: all warnings being treated as errors --- src/lxc/lxc_process.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index 0d5a070..ecfac50 100644 --- a/src/lxc/lxc_process.c +++ b/src/lxc/lxc_process.c @@ -21,6 +21,8 @@
#include <config.h>
+#include <sys/types.h>
Pointless. POSIX guarantees that headers are self-contained without needing <sys/types.h>.
+#include <sys/stat.h>
Required - ACK to this one line addition. Pushed. This unbreaks the jenkins build. Thanks, -- Guido
-- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On Fri, Mar 8, 2013 at 12:02 PM, Eric Blake <eblake@redhat.com> wrote:
On 03/08/2013 09:40 AM, Guido Günther wrote:
This fixes the build on Debian Wheezy which otherwise fails with:
CC libvirt_driver_lxc_impl_la-lxc_process.lo lxc/lxc_process.c: In function 'virLXCProcessGetNsInode': lxc/lxc_process.c:648:5: error: implicit declaration of function 'stat' [-Werror=implicit-function-declaration] lxc/lxc_process.c:648:5: error: nested extern declaration of 'stat' [-Werror=nested-externs] cc1: all warnings being treated as errors --- src/lxc/lxc_process.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c index 0d5a070..ecfac50 100644 --- a/src/lxc/lxc_process.c +++ b/src/lxc/lxc_process.c @@ -21,6 +21,8 @@
#include <config.h>
+#include <sys/types.h>
Pointless. POSIX guarantees that headers are self-contained without needing <sys/types.h>.
+#include <sys/stat.h>
Required - ACK to this one line addition.
-- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Pushed the ACK'd part to v1.0.3-maint Thanks. -- Doug Goldstein
participants (3)
-
Doug Goldstein
-
Eric Blake
-
Guido Günther