summaryrefslogtreecommitdiff
path: root/src/shared/missing.h
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2012-09-17 00:21:25 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2012-09-17 00:21:25 +0200
commit4db17f291c627c885de668200ff8cce2e57c933f (patch)
tree5cda400014b64ee4c6d30473443693eb13d5773b /src/shared/missing.h
parent54693d9bfa855841e8097d7a6b8c8d7acc068004 (diff)
build-sys: __secure_getenv lost dunder in libc 2.17
Diffstat (limited to 'src/shared/missing.h')
-rw-r--r--src/shared/missing.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/shared/missing.h b/src/shared/missing.h
index 7fbb9259eb..c5bb71a504 100644
--- a/src/shared/missing.h
+++ b/src/shared/missing.h
@@ -26,6 +26,7 @@
#include <sys/resource.h>
#include <sys/syscall.h>
#include <fcntl.h>
+#include <stdlib.h>
#include <unistd.h>
#include <linux/oom.h>
@@ -218,7 +219,6 @@ static inline pid_t gettid(void) {
#endif
#ifndef HAVE_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