X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Fmissing.h;h=bb4f8f23a8c2d7138de00e9067fa833b0a47b8b9;hb=a9169c1c589bf7c7a29e7905d17e350ce7c7c48e;hp=a88d9e414b171898f195134efdf5c48d9f08fbe2;hpb=c7e4a7bece7a5c4484d229dd5e8ff01a5d49c62e;p=elogind.git diff --git a/src/shared/missing.h b/src/shared/missing.h index a88d9e414..bb4f8f23a 100644 --- a/src/shared/missing.h +++ b/src/shared/missing.h @@ -527,3 +527,12 @@ static inline int setns(int fd, int nstype) { #ifndef BPF_XOR # define BPF_XOR 0xa0 #endif + +/* Note that LOOPBACK_IFINDEX is currently not exported by the + * kernel/glibc, but hardcoded internally by the kernel. However, as + * it is exported to userspace indirectly via rtnetlink and the + * ioctls, and made use of widely we define it here too, in a way that + * is compatible with the kernel's internal definition. */ +#ifndef LOOPBACK_IFINDEX +#define LOOPBACK_IFINDEX 1 +#endif