Make all header files self-suffienct

Almost all the headers in cryptsetup are self-suffienct (in that they
compile on their own). By including <stddef.h>, <stdint.h>, or
<sys/types.h>, all headers will now compile on their own.

This is useful for importing cryptsetup into Bazel/Blaze.
This commit is contained in:
joerichey@google.com
2018-07-06 12:00:23 -07:00
committed by Milan Broz
parent e8b6890318
commit 59b5f360af
5 changed files with 8 additions and 0 deletions

View File

@@ -22,6 +22,7 @@
#ifndef _LOOPAES_H
#define _LOOPAES_H
#include <stdint.h>
#include <unistd.h>
struct crypt_device;

View File

@@ -24,6 +24,8 @@
#ifndef INCLUDED_CRYPTSETUP_LUKS_AF_H
#define INCLUDED_CRYPTSETUP_LUKS_AF_H
#include <stddef.h>
/*
* AF_split operates on src and produces information split data in
* dst. src is assumed to be of the length blocksize. The data stripe

View File

@@ -24,6 +24,8 @@
#ifndef _CRYPTSETUP_UTILS_IO_H
#define _CRYPTSETUP_UTILS_IO_H
#include <sys/types.h>
ssize_t read_buffer(int fd, void *buf, size_t length);
ssize_t write_buffer(int fd, const void *buf, size_t length);
ssize_t write_blockwise(int fd, size_t bsize, size_t alignment,

View File

@@ -22,6 +22,8 @@
#ifndef _UTILS_KEYRING
#define _UTILS_KEYRING
#include <stddef.h>
int keyring_check(void);
int keyring_get_passphrase(const char *key_desc,

View File

@@ -21,6 +21,7 @@
#ifndef _VERITY_H
#define _VERITY_H
#include <stddef.h>
#include <stdint.h>
#define VERITY_MAX_HASH_TYPE 1