source: branches/fc15-dev/server/common/patches/openafs-0001-Linux-Add-autoconf-macro-for-structure-checks.patch @ 1873

Last change on this file since 1873 was 1835, checked in by achernya, 13 years ago
OpenAFS builds on F15 Get OpenAFS to build on F15, using the cherry-picked patches.
File size: 2.0 KB
RevLine 
[1835]1From 71ec6d24f675082d09926f87db2bfad639d6df74 Mon Sep 17 00:00:00 2001
2From: Simon Wilkinson <sxw@inf.ed.ac.uk>
3Date: Tue, 27 Apr 2010 13:02:20 +0100
4Subject: [PATCH 1/8] Linux: Add autoconf macro for structure checks
5
6Add a new autoconf macro for doing structure element checks.
7
8Reviewed-on: http://gerrit.openafs.org/1853
9Reviewed-by: Derrick Brashear <shadow@dementia.org>
10Tested-by: Derrick Brashear <shadow@dementia.org>
11(cherry picked from commit 02f2c7cb3734d44dc90b77d631909373daefacd3)
12
13Change-Id: Id7768128e058805baf8d44f2610f3345b25ac973
14[andersk@mit.edu: Remove modifications of existing structure checks]
15Signed-off-by: Anders Kaseorg <andersk@mit.edu>
16Reviewed-on: http://gerrit.openafs.org/3992
17Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
18Tested-by: BuildBot <buildbot@rampaginggeek.com>
19Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
20Reviewed-by: Russ Allbery <rra@stanford.edu>
21Reviewed-on: http://gerrit.openafs.org/4037
22Reviewed-by: Derrick Brashear <shadow@dementia.org>
23Tested-by: Derrick Brashear <shadow@dementia.org>
24---
25 src/cf/linux-test1.m4 |   14 ++++++++++++++
26 1 files changed, 14 insertions(+), 0 deletions(-)
27
28diff --git a/src/cf/linux-test1.m4 b/src/cf/linux-test1.m4
29index 0b40eb7..2da3bb8 100644
30--- a/src/cf/linux-test1.m4
31+++ b/src/cf/linux-test1.m4
32@@ -84,3 +84,17 @@ AC_DEFUN([LINUX_KBUILD_USES_EXTRA_CFLAGS], [
33     ac_linux_kbuild_requires_extra_cflags=yes)
34     CPPFLAGS="$save_CPPFLAGS"
35     AC_MSG_RESULT($ac_linux_kbuild_requires_extra_cflags)])
36+
37+dnl AC_CHECK_LINUX_STRUCT([structure], [element], [includes])
38+AC_DEFUN([AC_CHECK_LINUX_STRUCT],
39+ [AS_VAR_PUSHDEF([ac_linux_struct], [ac_cv_linux_struct_$1_has_$2])dnl
40+  AC_CACHE_CHECK([for $2 in struct $1], [ac_linux_struct],
41+   [AC_TRY_KBUILD([#include <linux/$3>],
42+                 [struct $1 _test; printk("%x\n", &_test.$2); ],
43+                 AS_VAR_SET([ac_linux_struct], [yes]),
44+                 AS_VAR_SET([ac_linux_struct], [no]))
45+   ])
46+  AS_IF([test AS_VAR_GET([ac_linux_struct]) = yes],
47+       [AC_DEFINE(AS_TR_CPP(STRUCT_$1_HAS_$2), 1,
48+                  [Define if kernel struct $1 has the $2 element])])
49+ ])
50--
511.7.3.4
52
Note: See TracBrowser for help on using the repository browser.