Use #if for HAVE*_H defines.

This commit is contained in:
Milan Broz
2025-01-16 12:47:25 +01:00
parent 37d52876b9
commit e5405f2fd8
10 changed files with 12 additions and 12 deletions

View File

@@ -14,7 +14,7 @@
#include <stdbool.h>
#include <stddef.h>
#include <string.h>
#ifdef HAVE_UCHAR_H
#if HAVE_UCHAR_H
#include <uchar.h>
#else
#define char32_t uint32_t

View File

@@ -15,7 +15,7 @@
#include <libdevmapper.h>
#include <uuid/uuid.h>
#include <sys/stat.h>
#ifdef HAVE_SYS_SYSMACROS_H
#if HAVE_SYS_SYSMACROS_H
# include <sys/sysmacros.h> /* for major, minor */
#endif
#include "internal.h"

View File

@@ -17,7 +17,7 @@
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#ifdef HAVE_SYS_SYSMACROS_H
#if HAVE_SYS_SYSMACROS_H
# include <sys/sysmacros.h> /* for major, minor */
#endif

View File

@@ -5,7 +5,7 @@
#define LOCALEDIR "/usr/share/locale"
#endif
#ifdef HAVE_LOCALE_H
#if HAVE_LOCALE_H
# include <locale.h>
#else
# undef setlocale

View File

@@ -16,10 +16,10 @@
#include <sys/ioctl.h>
#include <linux/fs.h>
#include <unistd.h>
#ifdef HAVE_SYS_SYSMACROS_H
#if HAVE_SYS_SYSMACROS_H
# include <sys/sysmacros.h> /* for major, minor */
#endif
#ifdef HAVE_SYS_STATVFS_H
#if HAVE_SYS_STATVFS_H
# include <sys/statvfs.h>
#endif
#include "internal.h"
@@ -50,7 +50,7 @@ static size_t device_fs_block_size_fd(int fd)
{
size_t page_size = crypt_getpagesize();
#ifdef HAVE_SYS_STATVFS_H
#if HAVE_SYS_STATVFS_H
struct statvfs buf;
/*

View File

@@ -15,7 +15,7 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#ifdef HAVE_SYS_SYSMACROS_H
#if HAVE_SYS_SYSMACROS_H
# include <sys/sysmacros.h> /* for major, minor */
#endif
#include <libgen.h>

View File

@@ -17,7 +17,7 @@
#include <limits.h>
#include <sys/stat.h>
#include <sys/types.h>
#ifdef HAVE_SYS_SYSMACROS_H
#if HAVE_SYS_SYSMACROS_H
# include <sys/sysmacros.h> /* for major, minor */
#endif
#include "internal.h"

View File

@@ -15,7 +15,7 @@
#include <limits.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#ifdef HAVE_SYS_SYSMACROS_H
#if HAVE_SYS_SYSMACROS_H
# include <sys/sysmacros.h> /* for major, minor */
#endif
#include <linux/types.h>

View File

@@ -8,7 +8,7 @@
#include "cryptsetup.h"
#include <dirent.h>
#ifdef HAVE_SYS_SYSMACROS_H
#if HAVE_SYS_SYSMACROS_H
# include <sys/sysmacros.h> /* for major, minor */
#endif
#include <uuid/uuid.h>

View File

@@ -21,7 +21,7 @@
# include <linux/keyctl.h>
# include <sys/syscall.h>
#endif
#ifdef HAVE_SYS_SYSMACROS_H
#if HAVE_SYS_SYSMACROS_H
# include <sys/sysmacros.h>
#endif
#include <linux/loop.h>