emacs|emacs25pre: Check AT_FDCWD is not defined before define it

https://github.com/NixOS/nixpkgs/issues/11723
This commit is contained in:
Jun Hao 2016-06-02 19:26:18 +08:00
parent 7c19b395eb
commit b8b15ca2a3
2 changed files with 8 additions and 4 deletions

View file

@ -1,12 +1,14 @@
diff --git a/lib/careadlinkat.h b/lib/careadlinkat.h
index 5cdb813..7a272e8 100644
index 84ede3e..8e8f42e 100644
--- a/lib/careadlinkat.h
+++ b/lib/careadlinkat.h
@@ -23,6 +23,8 @@
@@ -23,6 +23,10 @@
#include <fcntl.h>
#include <unistd.h>
+#ifndef AT_FDCWD
+#define AT_FDCWD -2
+#endif
+
struct allocator;

View file

@ -1,12 +1,14 @@
diff --git a/lib/careadlinkat.h b/lib/careadlinkat.h
index 5cdb813..7a272e8 100644
index 84ede3e..8e8f42e 100644
--- a/lib/careadlinkat.h
+++ b/lib/careadlinkat.h
@@ -23,6 +23,8 @@
@@ -23,6 +23,10 @@
#include <fcntl.h>
#include <unistd.h>
+#ifndef AT_FDCWD
+#define AT_FDCWD -2
+#endif
+
struct allocator;