X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Fmissing.h;h=802b4957e0a1f3f7d943a6efac7b9ed8b1dc6898;hb=0aa3b7830fd59d8b4ca275e9a9c4e79f8a23ff6d;hp=b33a70cb2cc7ba5134c7384db0477c9b76f44a90;hpb=84dd59b51c0db34f0334e90a5da2a45abcc9a52a;p=elogind.git diff --git a/src/shared/missing.h b/src/shared/missing.h index b33a70cb2..802b4957e 100644 --- a/src/shared/missing.h +++ b/src/shared/missing.h @@ -35,6 +35,7 @@ #include #include #include +#include #ifdef HAVE_AUDIT #include @@ -179,6 +180,16 @@ static inline int memfd_create(const char *name, unsigned int flags) { # define __NR_getrandom 349 # elif defined(__powerpc__) # define __NR_getrandom 359 +# elif defined _MIPS_SIM +# if _MIPS_SIM == _MIPS_SIM_ABI32 +# define __NR_getrandom 4353 +# endif +# if _MIPS_SIM == _MIPS_SIM_NABI32 +# define __NR_getrandom 6317 +# endif +# if _MIPS_SIM == _MIPS_SIM_ABI64 +# define __NR_getrandom 5313 +# endif # else # warning "__NR_getrandom unknown for your architecture" # define __NR_getrandom 0xffffffff @@ -613,6 +624,21 @@ static inline int setns(int fd, int nstype) { #define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1) #endif +#if !HAVE_DECL_NDA_IFINDEX +#define NDA_UNSPEC 0 +#define NDA_DST 1 +#define NDA_LLADDR 2 +#define NDA_CACHEINFO 3 +#define NDA_PROBES 4 +#define NDA_VLAN 5 +#define NDA_PORT 6 +#define NDA_VNI 7 +#define NDA_IFINDEX 8 +#define __NDA_MAX 9 + +#define NDA_MAX (__NDA_MAX - 1) +#endif + #ifndef IPV6_UNICAST_IF #define IPV6_UNICAST_IF 76 #endif