[tip:tools/kvm] kvm tools: Fix build breakage due to <linux/stddef .h> changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit-ID:  929c89a0f6e3ae33d4904a47fbd20105de38026e
Gitweb:     http://git.kernel.org/tip/929c89a0f6e3ae33d4904a47fbd20105de38026e
Author:     Pekka Enberg <penberg@xxxxxxxxxx>
AuthorDate: Tue, 8 May 2012 08:27:13 +0300
Committer:  Pekka Enberg <penberg@xxxxxxxxxx>
CommitDate: Tue, 8 May 2012 08:28:39 +0300

kvm tools: Fix build breakage due to <linux/stddef.h> changes

Commit 2084c24 ("do not export kernel's NULL #define to userspace") broken KVM
tool build:

  FYI:

   CC       framebuffer.o
  In file included from include/kvm/framebuffer.h:5:0,
                from framebuffer.c:1:
  ../../include/linux/list.h: In function ‘INIT_HLIST_NODE’:
  ../../include/linux/list.h:572:12: error: ‘NULL’ undeclared (first use in this function)
  ../../include/linux/list.h:572:12: note: each undeclared identifier is reported only once for each function it appears in
  ../../include/linux/list.h: In function ‘hlist_move_list’:
  ../../include/linux/list.h:657:15: error: ‘NULL’ undeclared (first use in this function)
  make: *** [framebuffer.o] Error 1

  due to this upstream commit:

   2084c24a8141 do not export kernel's NULL #define to userspace

Fix that.

Reported-by: Ingo Molnar <mingo@xxxxxxxxxx>
Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxx>
---
 {include => tools/kvm/include}/linux/stddef.h |   12 ------------
 1 files changed, 0 insertions(+), 12 deletions(-)

diff --git a/include/linux/stddef.h b/tools/kvm/include/linux/stddef.h
similarity index 70%
copy from include/linux/stddef.h
copy to tools/kvm/include/linux/stddef.h
index 6a40c76..60ea512 100644
--- a/include/linux/stddef.h
+++ b/tools/kvm/include/linux/stddef.h
@@ -4,18 +4,7 @@
 #include <linux/compiler.h>
 
 #undef NULL
-#if defined(__cplusplus)
-#define NULL 0
-#else
 #define NULL ((void *)0)
-#endif
-
-#ifdef __KERNEL__
-
-enum {
-	false	= 0,
-	true	= 1
-};
 
 #undef offsetof
 #ifdef __compiler_offsetof
@@ -23,6 +12,5 @@ enum {
 #else
 #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
 #endif
-#endif /* __KERNEL__ */
 
 #endif
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux