Path: blob/main/tools/build/cross-build/include/linux/sys/stat.h
39586 views
/*-1* SPDX-License-Identifier: BSD-2-Clause2*3* Copyright 2018-2020 Alex Richardson <[email protected]>4*5* This software was developed by SRI International and the University of6* Cambridge Computer Laboratory (Department of Computer Science and7* Technology) under DARPA contract HR0011-18-C-0016 ("ECATS"), as part of the8* DARPA SSITH research programme.9*10* This software was developed by SRI International and the University of11* Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)12* ("CTSRD"), as part of the DARPA CRASH research programme.13*14* Redistribution and use in source and binary forms, with or without15* modification, are permitted provided that the following conditions16* are met:17* 1. Redistributions of source code must retain the above copyright18* notice, this list of conditions and the following disclaimer.19* 2. Redistributions in binary form must reproduce the above copyright20* notice, this list of conditions and the following disclaimer in the21* documentation and/or other materials provided with the distribution.22*23* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND24* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE25* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE26* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE27* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL28* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS29* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)30* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT31* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY32* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF33* SUCH DAMAGE.34*/35#pragma once36/*37* glibc shipped with Ubuntu 16.04 doesn't include a definition of38* struct timespec when sys/stat.h is included.39*/40#define __need_timespec41#include <time.h>4243/* <bits/stat.h> contains a member named __unused. */44#include "../__unused_workaround_start.h"45#include_next <sys/stat.h>46#include "../__unused_workaround_end.h"4748#define st_atimensec st_atim.tv_nsec49#define st_mtimensec st_mtim.tv_nsec50#define st_ctimensec st_ctim.tv_nsec5152#define st_atimespec st_atim53#define st_mtimespec st_mtim54#define st_ctimespec st_ctim5556#ifndef S_ISTXT57#define S_ISTXT S_ISVTX58#endif5960#ifndef DEFFILEMODE61#define DEFFILEMODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)62#endif6364#ifndef ALLPERMS65#define ALLPERMS (S_ISUID | S_ISGID | S_ISTXT | S_IRWXU | S_IRWXG | S_IRWXO)66#endif6768#define UF_SETTABLE 0x0000ffff69#define UF_NODUMP 0x0000000170#define UF_IMMUTABLE 0x0000000271#define UF_APPEND 0x0000000472#define UF_OPAQUE 0x0000000873#define UF_NOUNLINK 0x0000001074#define UF_SYSTEM 0x0000008075#define UF_SPARSE 0x0000010076#define UF_OFFLINE 0x0000020077#define UF_REPARSE 0x0000040078#define UF_ARCHIVE 0x0000080079#define UF_READONLY 0x0000100080#define UF_HIDDEN 0x0000800081#define SF_SETTABLE 0xffff000082#define SF_ARCHIVED 0x0001000083#define SF_IMMUTABLE 0x0002000084#define SF_APPEND 0x0004000085#define SF_NOUNLINK 0x0010000086#define SF_SNAPSHOT 0x002000008788/* This include is needed for OpenZFS bootstrap */89#include <sys/mount.h>909192