mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-01-23 00:07:07 +03:00
Patches to support musl libc
UTIME_NOW is defined in <sys/stat.h> on glibc and musl. Else, we just need a few headers to get glibc's <sys/cdefs.h> crud.
This commit is contained in:
parent
e523a844d6
commit
3217fffd09
@ -1,6 +1,7 @@
|
||||
#ifndef __LINUX_BYTEORDER_H
|
||||
#define __LINUX_BYTEORDER_H
|
||||
|
||||
#include <linux/compiler.h>
|
||||
#include <asm/byteorder.h>
|
||||
|
||||
#define swab16 __swab16
|
||||
|
@ -184,7 +184,7 @@ unsigned long __rounddown_pow_of_two(unsigned long n)
|
||||
__rounddown_pow_of_two(n) \
|
||||
)
|
||||
|
||||
static inline __attribute_const__
|
||||
static inline __attribute__((const))
|
||||
int __get_order(unsigned long size)
|
||||
{
|
||||
int order;
|
||||
|
@ -9,7 +9,4 @@
|
||||
#define S_IWUGO (S_IWUSR|S_IWGRP|S_IWOTH)
|
||||
#define S_IXUGO (S_IXUSR|S_IXGRP|S_IXOTH)
|
||||
|
||||
#define UTIME_NOW ((1l << 30) - 1l)
|
||||
#define UTIME_OMIT ((1l << 30) - 2l)
|
||||
|
||||
#endif
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#define __SANE_USERSPACE_TYPES__ /* For PPC64, to get LL64 types */
|
||||
|
@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#include <asm/types.h>
|
||||
#include <linux/compiler.h>
|
||||
#include <asm/byteorder.h>
|
||||
#include <linux/uuid.h>
|
||||
|
||||
|
@ -43,6 +43,7 @@
|
||||
* https://131002.net/siphash/
|
||||
*/
|
||||
|
||||
#include <linux/compiler.h>
|
||||
#include <asm/byteorder.h>
|
||||
#include <asm/unaligned.h>
|
||||
#include <linux/bitops.h>
|
||||
|
Loading…
Reference in New Issue
Block a user