]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Fix Linux kernel modules build on 2.6.33-rc1
authorVMware, Inc <>
Wed, 20 Jan 2010 21:25:26 +0000 (13:25 -0800)
committerMarcelo Vanzin <mvanzin@vmware.com>
Wed, 20 Jan 2010 21:25:26 +0000 (13:25 -0800)
linux/utsrelease.h & friends moved from linux/ to generated/.  Which
breaks all our sources, plus all our builders.

So there are two changes: (1) make sure our modules include
appropriate autoconf.h, and (2) update modconf to know that
utsrelease.h may live in different directory.

While I was in modconf I could not resist to remove some duplicated
code...

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
15 files changed:
open-vm-tools/modules/linux/shared/autoconf/cachecreate.c
open-vm-tools/modules/linux/shared/autoconf/cachector.c
open-vm-tools/modules/linux/shared/autoconf/cachector1.c
open-vm-tools/modules/linux/shared/autoconf/epoll.c
open-vm-tools/modules/linux/shared/autoconf/filldir1.c
open-vm-tools/modules/linux/shared/autoconf/geninclude.c
open-vm-tools/modules/linux/shared/autoconf/getsb1.c
open-vm-tools/modules/linux/shared/autoconf/inode1.c
open-vm-tools/modules/linux/shared/autoconf/netif_num_params.c
open-vm-tools/modules/linux/shared/autoconf/setnice.c
open-vm-tools/modules/linux/shared/autoconf/sk_filter.c
open-vm-tools/modules/linux/shared/autoconf/skblin.c
open-vm-tools/modules/linux/shared/autoconf/statfs1.c
open-vm-tools/modules/linux/shared/compat_autoconf.h [new file with mode: 0644]
open-vm-tools/modules/linux/shared/driver-config.h

index 88c51c199a9e56717d93b44b3cb73d6abb3ed125..1eaaf1e28304243ae1430b6374fa7b3d31e5fe7e 100644 (file)
@@ -16,8 +16,8 @@
  *
  *********************************************************/
 
-#include <linux/autoconf.h>
-#include <linux/version.h>
+#include "compat_version.h"
+#include "compat_autoconf.h"
 
 /*
  * All kernels before 2.6.22 take 6 arguments.  All kernels since
index bbc124deac286030d87554856cf83a4d377ffefd..0f81ed45d4e21c562e22f0f6afff396cad13ef66 100644 (file)
@@ -16,8 +16,8 @@
  *
  *********************************************************/
 
-#include <linux/autoconf.h>
-#include <linux/version.h>
+#include "compat_version.h"
+#include "compat_autoconf.h"
 
 /*
  * Between 2.6.23 and 2.6.24-rc1 ctor prototype was changed from
index 8dc874186b6b2a9c39598ac081879eeef1d6c472..6915e11f75ea341077dbabdb9141d29cf2da64e0 100644 (file)
@@ -16,8 +16,8 @@
  *
  *********************************************************/
 
-#include <linux/autoconf.h>
-#include <linux/version.h>
+#include "compat_version.h"
+#include "compat_autoconf.h"
 
 /*
  * Between 2.6.27-rc1 and 2.6.27-rc2 ctor prototype was changed from
index 44083c6bebca135d6376622e8fb2a0c2bddbbfd0..2eb67e20ced94d983cb25f8fd4488add5e2f2bc9 100644 (file)
@@ -22,8 +22,8 @@
  * never had it, but some distros backported epoll patch.
  */
 
-#include <linux/autoconf.h>
-#include <linux/version.h>
+#include "compat_version.h"
+#include "compat_autoconf.h"
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
 #include <linux/poll.h>
index 754da625baca27284120bf9c40f48e6a4c9ee089..2a2ca718993764d9a7b127074a09571e19dba53e 100644 (file)
@@ -16,8 +16,8 @@
  *
  *********************************************************/
 
-#include <linux/autoconf.h>
-#include <linux/version.h>
+#include "compat_version.h"
+#include "compat_autoconf.h"
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)
 #include <linux/fs.h>
index f37a20f1027e52088381212527ab994d91d8938a..88d68dc5595bb9bac8a99f5629ec0748c96b0c54 100644 (file)
@@ -16,7 +16,8 @@
  *
  *********************************************************/
 
-#include <linux/autoconf.h>
+#include "compat_version.h"
+#include "compat_autoconf.h"
 
 #ifdef CONFIG_X86_VOYAGER
 APATH/mach-voyager
index 862ae2b3287760efacad87184d6690738e1d5076..5965416dcf785252fbeb8662190d94bb78aec858 100644 (file)
@@ -16,8 +16,8 @@
  *
  *********************************************************/
 
-#include <linux/autoconf.h>
-#include <linux/version.h>
+#include "compat_version.h"
+#include "compat_autoconf.h"
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)
 
index d010146fc114e6c53327a027bf48c0cfa7807218..eeec3c6b182c784fe77ffd6e6abce955e11ed669 100644 (file)
@@ -16,8 +16,8 @@
  *
  *********************************************************/
 
-#include <linux/autoconf.h>
-#include <linux/version.h>
+#include "compat_version.h"
+#include "compat_autoconf.h"
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)
 #include <linux/fs.h>
index fa75af40d2dcb38592c93bc4103c4f64bd6aa7b9..a90883b12cf1ccd14d488d8fd80e0031eb3448d9 100644 (file)
@@ -28,8 +28,8 @@
  * takes only single napi argument.
  */
 
-#include <linux/autoconf.h>
-#include <linux/version.h>
+#include "compat_version.h"
+#include "compat_autoconf.h"
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30)
 #   error This compile test intentionally fails.
index 8d5ebf21f575ba53d0af5b49657c006120276f7e..31ac8a641323d2059d3c50f873802133ce66c037 100644 (file)
@@ -20,8 +20,8 @@
  * set_user_nice appeared in 2.4.21.  But some distros
  * backported it to older kernels.
  */
-#include <linux/autoconf.h>
-#include <linux/version.h>
+#include "compat_version.h"
+#include "compat_autoconf.h"
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 21)
 #include <linux/sched.h>
index 936e4f12c6d737347046342ed9b83a626b4a4f7c..f8bb288c3edad6d34e99905496318a4c6a101464 100644 (file)
@@ -23,8 +23,8 @@
  * This test will fail to build on kernels with the new interface.
  */
 
-#include <linux/autoconf.h>
-#include <linux/version.h>
+#include "compat_version.h"
+#include "compat_autoconf.h"
 
 /*
  * We'd restrict this test to 2.4.21 and earlier kernels, but Mandrake's
index abdcd473b6849f6361a6f148555648b5f74e19e5..e3a6ccdcc55b46ed9ca426fbaec935f8a586b212 100644 (file)
@@ -20,8 +20,8 @@
  * Detect whether skb_linearize takes one or two arguments.
  */
 
-#include <linux/autoconf.h>
-#include <linux/version.h>
+#include "compat_version.h"
+#include "compat_autoconf.h"
 
 #if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 17)
 /*
index 8501cab2f353e94b832bf087f19dcef6a00028ac..a753917bdeafa16784645ef84959c9f6c0d72c2c 100644 (file)
@@ -16,8 +16,8 @@
  *
  *********************************************************/
 
-#include <linux/autoconf.h>
-#include <linux/version.h>
+#include "compat_version.h"
+#include "compat_autoconf.h"
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)
 #include <linux/fs.h>
diff --git a/open-vm-tools/modules/linux/shared/compat_autoconf.h b/open-vm-tools/modules/linux/shared/compat_autoconf.h
new file mode 100644 (file)
index 0000000..868b3ad
--- /dev/null
@@ -0,0 +1,40 @@
+/*********************************************************
+ * Copyright (C) 2009 VMware, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation version 2 and no later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ *
+ *********************************************************/
+
+#ifndef __COMPAT_AUTOCONF_H__
+#   define __COMPAT_AUTOCONF_H__
+
+#define INCLUDE_ALLOW_VMMON
+#define INCLUDE_ALLOW_MODULE
+#define INCLUDE_ALLOW_VMCORE
+#define INCLUDE_ALLOW_DISTRIBUTE
+#include "includeCheck.h"
+
+
+#ifndef LINUX_VERSION_CODE
+#   error "Include compat_version.h before compat_autoconf.h"
+#endif
+
+/* autoconf.h moved from linux/autoconf.h to generated/autoconf.h in 2.6.33-rc1. */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33)
+#   include <linux/autoconf.h>
+#else
+#   include <generated/autoconf.h>
+#endif
+
+#endif /* __COMPAT_AUTOCONF_H__ */
index 62e3fd611aa95b12e8c13448fd3d7de74d6fe2cb..927e7802dc6a97bdc45f9d120fe892d9b81cd940 100644 (file)
@@ -31,8 +31,8 @@
 #define INCLUDE_ALLOW_MODULE
 #include "includeCheck.h"
 
-#include <linux/autoconf.h>
 #include "compat_version.h"
+#include "compat_autoconf.h"
 
 /*
  * We rely on Kernel Module support.  Check here.