From 0d1a16d48f7d48195f2b993a5d2613e171c60c58 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 2 Jan 2015 14:34:57 -0600 Subject: [PATCH] emacs24: Add #define for building on Yosemite (darwin) --- pkgs/applications/editors/emacs-24/at-fdcwd.patch | 13 +++++++++++++ pkgs/applications/editors/emacs-24/default.nix | 5 ++++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 pkgs/applications/editors/emacs-24/at-fdcwd.patch diff --git a/pkgs/applications/editors/emacs-24/at-fdcwd.patch b/pkgs/applications/editors/emacs-24/at-fdcwd.patch new file mode 100644 index 00000000000..1f99d4e1809 --- /dev/null +++ b/pkgs/applications/editors/emacs-24/at-fdcwd.patch @@ -0,0 +1,13 @@ +diff --git a/lib/careadlinkat.h b/lib/careadlinkat.h +index 5cdb813..7a272e8 100644 +--- a/lib/careadlinkat.h ++++ b/lib/careadlinkat.h +@@ -23,6 +23,8 @@ + #include + #include + ++#define AT_FDCWD -2 ++ + struct allocator; + + /* Assuming the current directory is FD, get the symbolic link value diff --git a/pkgs/applications/editors/emacs-24/default.nix b/pkgs/applications/editors/emacs-24/default.nix index 8f954515b8f..71b98eec0e9 100644 --- a/pkgs/applications/editors/emacs-24/default.nix +++ b/pkgs/applications/editors/emacs-24/default.nix @@ -18,7 +18,10 @@ stdenv.mkDerivation rec { sha256 = "1zflm6ac34s6v166p58ilxrxbxjm0q2wfc25f8y0mjml1lbr3qs7"; }; - patches = [ ./darwin-new-sections.patch ]; + patches = stdenv.lib.optionals stdenv.isDarwin [ + ./darwin-new-sections.patch + ./at-fdcwd.patch + ]; buildInputs = [ ncurses gconf libxml2 gnutls alsaLib pkgconfig texinfo ]