Attempt to fix the build on HP/UX
authorVolker Lendecke <vl@samba.org>
Tue, 26 May 2009 21:37:14 +0000 (23:37 +0200)
committerVolker Lendecke <vl@samba.org>
Tue, 26 May 2009 21:38:22 +0000 (23:38 +0200)
source3/configure.in
source3/include/includes.h

index 44374b989cb4091efb129cf8fb0635e054cb73a4..f98091166639ee76bee268841b494ad789e4f134 100644 (file)
@@ -2778,6 +2778,8 @@ if test x"$samba_cv_HAVE_STAT_ST_BLOCKS" = x"yes"; then
     AC_DEFINE(HAVE_STAT_ST_BLOCKS,1,[Whether the stat struct has a st_block property])
 fi
 
+AC_CHECK_TYPES([blksize_t, blkcnt_t], [], [], [[#include <sys/stat.h>]])
+
 AC_CACHE_CHECK([for st_blksize in struct stat],samba_cv_HAVE_STAT_ST_BLKSIZE,[
 AC_TRY_COMPILE([#include <sys/types.h>
 #include <sys/stat.h>
index 0d66c1cd6b2197fc9c098f517303ebefc725df8b..7bb72be69233363a9fadcd39ad51be2b4838f4e9 100644 (file)
@@ -431,6 +431,16 @@ typedef uint64_t br_off;
 #define IVAL_TO_SMB_OFF_T(buf,off) ((SMB_OFF_T)(( ((uint32)(IVAL((buf),(off)))) & 0xFFFFFFFF )))
 #endif
 
+#ifndef HAVE_BLKSIZE_T
+/* This is mainly for HP/UX which defines st_blksize as long */
+typedef blksize_t long;
+#endif
+
+#ifndef HAVE_BLKCNT_T
+/* This is mainly for HP/UX which doesn't have blkcnt_t */
+typedef blkcnt_t long;
+#endif
+
 /*
  * Type for stat structure.
  */