]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfsprogs: define umode_t for build if not defined already
authorMichael L. Semon <mlsemon35@gmail.com>
Fri, 14 Jun 2013 07:00:34 +0000 (03:00 -0400)
committerBen Myers <bpm@sgi.com>
Tue, 25 Jun 2013 21:13:17 +0000 (16:13 -0500)
umode_t has not been exported to the kernel private headers since
around kernel 3.2.0-rc7.  Add a check for umode_t and define it
if it has not been defined already.

Signed-off-by: Michael L. Semon <mlsemon35@gmail.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
configure.ac
include/builddefs.in
include/platform_defs.h.in
m4/package_types.m4

index b968977384effa1cb096ec13ffecb6e37dd6a29e..e5fd94e4194a4c6b798aa6b3a5a5948c6135d3d2 100644 (file)
@@ -118,6 +118,7 @@ AC_CHECK_SIZEOF([char *])
 AC_TYPE_PSINT
 AC_TYPE_PSUNSIGNED
 AC_TYPE_U32
+AC_TYPE_UMODE_T
 AC_MANUAL_FORMAT
 
 AC_CONFIG_FILES([include/builddefs])
index 0a3fa1a93cd919da0f4c6cbd478c188283dcd815..744e8d347fd6ed68769559102af1fad13e1e4b40 100644 (file)
@@ -109,6 +109,9 @@ GCCFLAGS = -funsigned-char -fno-strict-aliasing -Wall
 
 ifeq ($(PKG_PLATFORM),linux)
 PCFLAGS = -D_GNU_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_FILE_OFFSET_BITS=64 $(GCCFLAGS)
+ifeq ($(HAVE_UMODE_T),yes)
+PCFLAGS += -DHAVE_UMODE_T
+endif
 DEPENDFLAGS = -D__linux__
 endif
 ifeq ($(PKG_PLATFORM),gnukfreebsd)
index 217d6c0d9bfdf94d0a6e08ab2bbc89716eeadaaf..3c0106e0d8efc95441d4312d46f569aa3c78c465 100644 (file)
@@ -123,6 +123,11 @@ typedef unsigned long long __psunsigned_t;
 # endif
 #endif
 
+/* Check whether to define umode_t ourselves. */
+#ifndef HAVE_UMODE_T
+typedef unsigned short umode_t;
+#endif
+
 /* Define if you want gettext (I18N) support */
 #undef ENABLE_GETTEXT
 #ifdef ENABLE_GETTEXT
index dfcb0d9989f198f6d98f6273a35c602cf17ec3b8..454c84a3f52975edbc5362f8c982f8be8ca26d24 100644 (file)
@@ -39,3 +39,14 @@ AC_DEFUN([AC_TYPE_U32],
          __u32  u32;
     ], AC_DEFINE(HAVE___U32) AC_MSG_RESULT(yes) , AC_MSG_RESULT(no))
   ])
+#
+# Check if we have umode_t
+#
+AC_DEFUN([AC_TYPE_UMODE_T],
+  [ AC_MSG_CHECKING([for umode_t])
+    AC_TRY_COMPILE([
+#include <asm/types.h>
+    ], [
+         umode_t umode;
+    ], AC_DEFINE(HAVE_UMODE_T) AC_MSG_RESULT(yes) , AC_MSG_RESULT(no))
+  ])