mirror of
https://github.com/SELinuxProject/setools
synced 2025-03-20 10:06:29 +00:00
headers and types not present on Darwin either wrapped or added in linux_types.h
This commit is contained in:
parent
9a89d9b63b
commit
42fb95a9c9
@ -11,3 +11,4 @@ include qhc/*
|
||||
include tests/*.conf
|
||||
include tests/*.py
|
||||
include tests/perm_map
|
||||
include include/*
|
||||
|
18
include/linux_types.h
Normal file
18
include/linux_types.h
Normal file
@ -0,0 +1,18 @@
|
||||
#ifndef linux_types_h
|
||||
#define linux_types_h
|
||||
|
||||
#ifdef __linux__
|
||||
# include "linux/types.h"
|
||||
#else
|
||||
# include <stdint.h>
|
||||
typedef int32_t __s32;
|
||||
typedef uint32_t __u32;
|
||||
typedef uint8_t __u8;
|
||||
typedef uint16_t __u16;
|
||||
#define s6_addr32 __u6_addr32
|
||||
|
||||
#define IPPROTO_DCCP 33
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -28,8 +28,6 @@
|
||||
|
||||
#include "qpol_internal.h"
|
||||
#include <assert.h>
|
||||
#include <byteswap.h>
|
||||
#include <endian.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <limits.h>
|
||||
@ -37,7 +35,15 @@
|
||||
#include <stdlib.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
#include <asm/types.h>
|
||||
|
||||
#ifdef DARWIN
|
||||
# include "linux_types.h"
|
||||
# include <machine/endian.h>
|
||||
# include <sys/types.h>
|
||||
#else
|
||||
# include <endian.h>
|
||||
# include <asm/types.h>
|
||||
#endif
|
||||
|
||||
#include <sepol/debug.h>
|
||||
#include <sepol/handle.h>
|
||||
|
@ -57,6 +57,10 @@
|
||||
#include <sepol/policydb/polcaps.h>
|
||||
#include "queue.h"
|
||||
|
||||
#ifdef DARWIN
|
||||
#include "linux_types.h"
|
||||
#endif
|
||||
|
||||
/* Required for SETools libqpol - Removed #include "checkpolicy.h"*/
|
||||
#include <qpol/policy.h>
|
||||
|
||||
|
@ -46,7 +46,6 @@ const char *libqpol_get_version(void)
|
||||
#include <stdlib.h>
|
||||
#include <bzlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/sendfile.h>
|
||||
|
||||
#define BZ2_MAGICSTR "BZh"
|
||||
#define BZ2_MAGICLEN (sizeof(BZ2_MAGICSTR)-1)
|
||||
|
Loading…
Reference in New Issue
Block a user