summaryrefslogtreecommitdiff
path: root/lib/ext2fs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ext2fs')
-rw-r--r--lib/ext2fs/crc16.c5
-rw-r--r--lib/ext2fs/crc16.h2
-rw-r--r--lib/ext2fs/csum.c4
-rw-r--r--lib/ext2fs/tst_csum.c4
4 files changed, 13 insertions, 2 deletions
diff --git a/lib/ext2fs/crc16.c b/lib/ext2fs/crc16.c
index 86091a41..026f040b 100644
--- a/lib/ext2fs/crc16.c
+++ b/lib/ext2fs/crc16.c
@@ -5,6 +5,11 @@
* Version 2. See the file COPYING for more details.
*/
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#include <ext2fs/ext2_types.h>
+
#include "crc16.h"
/** CRC table for the CRC-16. The poly is 0x8005 (x16 + x15 + x2 + 1) */
diff --git a/lib/ext2fs/crc16.h b/lib/ext2fs/crc16.h
index e3d8b4a5..322e68dd 100644
--- a/lib/ext2fs/crc16.h
+++ b/lib/ext2fs/crc16.h
@@ -15,8 +15,6 @@
#ifndef __CRC16_H
#define __CRC16_H
-#include <ext2fs/ext2_types.h>
-
/* for an unknown reason, PPC treats __u16 as signed and keeps doing sign
* extension on the value. Instead, use only the low 16 bits of an
* unsigned int for holding the CRC value to avoid this.
diff --git a/lib/ext2fs/csum.c b/lib/ext2fs/csum.c
index 459c3c08..0f01919c 100644
--- a/lib/ext2fs/csum.c
+++ b/lib/ext2fs/csum.c
@@ -9,6 +9,10 @@
* %End-Header%
*/
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
#include "ext2_fs.h"
#include "ext2fs.h"
#include "crc16.h"
diff --git a/lib/ext2fs/tst_csum.c b/lib/ext2fs/tst_csum.c
index 7a91b194..d8816b30 100644
--- a/lib/ext2fs/tst_csum.c
+++ b/lib/ext2fs/tst_csum.c
@@ -9,6 +9,10 @@
* %End-Header%
*/
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
#include "ext2fs/ext2_fs.h"
#include "ext2fs/ext2fs.h"
#include "ext2fs/crc16.h"