X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fshared%2Fmissing.h;h=1a31066032e7de740ab21116fbf3b8dbae86b7d9;hp=7fbb9259ebae8151746058c8444f88a66f32480c;hb=9388e99e208a6487b26dcbda86005ee9eba8d93d;hpb=a8348796c0d39435b1c3d85ce6e95dad1ac85fec diff --git a/src/shared/missing.h b/src/shared/missing.h index 7fbb9259e..1a3106603 100644 --- a/src/shared/missing.h +++ b/src/shared/missing.h @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -208,17 +209,16 @@ static inline pid_t gettid(void) { #endif #ifdef __x86_64__ -# ifndef __NR_name_to_handle -# define __NR_name_to_handle 303 +# ifndef __NR_name_to_handle_at +# define __NR_name_to_handle_at 303 # endif #else -# ifndef __NR_name_to_handle -# define __NR_name_to_handle 341 +# ifndef __NR_name_to_handle_at +# define __NR_name_to_handle_at 341 # endif #endif -#ifndef HAVE_NAME_TO_HANDLE_AT - +#if !HAVE_DECL_NAME_TO_HANDLE_AT struct file_handle { unsigned int handle_bytes; int handle_type; @@ -229,3 +229,11 @@ static inline int name_to_handle_at(int fd, const char *name, struct file_handle return syscall(__NR_name_to_handle_at, fd, name, handle, mnt_id, flags); } #endif + +#ifndef HAVE_SECURE_GETENV +# ifdef HAVE___SECURE_GETENV +# define secure_getenv __secure_getenv +# else +# error neither secure_getenv nor __secure_getenv are available +# endif +#endif