2014-05-19 09:34:31 -04:00
|
|
|
/*
|
2016-01-14 16:50:22 -05:00
|
|
|
Copyright (c) 2016, Antonio SJ Musumeci <trapexit@spawn.link>
|
|
|
|
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
|
|
purpose with or without fee is hereby granted, provided that the above
|
|
|
|
copyright notice and this permission notice appear in all copies.
|
|
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
|
|
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
|
|
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
|
|
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
|
|
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
|
|
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
|
|
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
2014-05-19 09:34:31 -04:00
|
|
|
*/
|
|
|
|
|
2017-06-30 11:15:20 -04:00
|
|
|
#pragma once
|
2016-12-22 22:46:20 -05:00
|
|
|
|
2018-10-09 11:58:06 -04:00
|
|
|
#if defined(__ANDROID__)
|
|
|
|
# include <sys/cdefs.h>
|
|
|
|
#elif defined(__APPLE__)
|
|
|
|
# include <TargetConditionals.h>
|
|
|
|
#elif defined(__linux__)
|
|
|
|
# include <features.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef USE_XATTR
|
2018-11-28 17:08:40 -05:00
|
|
|
# ifdef __linux__
|
|
|
|
# include <sys/types.h>
|
2018-10-09 11:58:06 -04:00
|
|
|
# include <sys/xattr.h>
|
|
|
|
# else
|
|
|
|
# undef USE_XATTR
|
|
|
|
# warning "USE_XATTR unset: xattrs disabled"
|
|
|
|
# endif
|
2014-05-19 09:34:31 -04:00
|
|
|
#endif
|
2014-07-29 00:00:42 -04:00
|
|
|
|
|
|
|
#ifndef XATTR_CREATE
|
2016-09-14 08:36:06 -04:00
|
|
|
# define XATTR_CREATE 0x1
|
2014-07-29 00:00:42 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef XATTR_REPLACE
|
2016-09-14 08:36:06 -04:00
|
|
|
# define XATTR_REPLACE 0x2
|
2014-07-29 00:00:42 -04:00
|
|
|
#endif
|