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:
Leah Neukirchen 2018-02-09 22:20:56 +01:00
parent e523a844d6
commit 3217fffd09
6 changed files with 5 additions and 4 deletions

View File

@ -1,6 +1,7 @@
#ifndef __LINUX_BYTEORDER_H
#define __LINUX_BYTEORDER_H
#include <linux/compiler.h>
#include <asm/byteorder.h>
#define swab16 __swab16

View File

@ -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;

View File

@ -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

View File

@ -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 */

View File

@ -6,6 +6,7 @@
*/
#include <asm/types.h>
#include <linux/compiler.h>
#include <asm/byteorder.h>
#include <linux/uuid.h>

View File

@ -43,6 +43,7 @@
* https://131002.net/siphash/
*/
#include <linux/compiler.h>
#include <asm/byteorder.h>
#include <asm/unaligned.h>
#include <linux/bitops.h>