mirror of
https://github.com/SELinuxProject/selinux
synced 2024-12-24 06:52:12 +00:00
cf8625be58
ratbert90 submitted this patch via https://github.com/SELinuxProject/selinux/issues/19. Apparently musl does not provide sys/cdefs.h, see http://wiki.musl-libc.org/wiki/FAQ#Q:_I.27m_trying_to_compile_something_against_musl_and_I_get_error_messages_about_sys.2Fcdefs.h. Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
34 lines
852 B
C
34 lines
852 B
C
/* Author: Karl MacMillan <kmacmillan@mentalrootkit.com> */
|
|
|
|
#ifndef __sepol_errno_h__
|
|
#define __sepol_errno_h__
|
|
|
|
#include <errno.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#define SEPOL_OK 0
|
|
|
|
/* These first error codes are defined for compatibility with
|
|
* previous version of libsepol. In the future, custome error
|
|
* codes that don't map to system error codes should be defined
|
|
* outside of the range of system error codes.
|
|
*/
|
|
#define SEPOL_ERR -1
|
|
#define SEPOL_ENOTSUP -2 /* feature not supported in module language */
|
|
#define SEPOL_EREQ -3 /* requirements not met */
|
|
|
|
/* Error codes that map to system error codes */
|
|
#define SEPOL_ENOMEM -ENOMEM
|
|
#define SEPOL_ERANGE -ERANGE
|
|
#define SEPOL_EEXIST -EEXIST
|
|
#define SEPOL_ENOENT -ENOENT
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|