소스 검색

Fix to add uintmax_t, for check_disk.c compile

git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1456 f882894a-f735-0410-b71e-b25c423dba1c
Ton Voon 19 년 전
부모
커밋
8b6d9e5eab
1개의 변경된 파일13개의 추가작업 그리고 0개의 파일을 삭제
  1. 13 0
      plugins/common.h

+ 13 - 0
plugins/common.h

@@ -44,6 +44,19 @@
 #include <stdio.h>							/* obligatory includes */
 #include <stdio.h>							/* obligatory includes */
 #include <stdlib.h>
 #include <stdlib.h>
 #include <errno.h>
 #include <errno.h>
+
+/* This block provides uintmax_t - should be reported to coreutils that this should be added to fsuage.h */
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#if HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#include <unistd.h>
+#ifndef UINTMAX_MAX
+# define UINTMAX_MAX ((uintmax_t) -1)
+#endif
+
 #include <limits.h>	/* This is assumed true, because coreutils assume it too */
 #include <limits.h>	/* This is assumed true, because coreutils assume it too */
 
 
 #ifdef HAVE_MATH_H
 #ifdef HAVE_MATH_H