From 8734252a0449c1426cfbb971915ee47466bb7153 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Thu, 16 May 2013 11:46:43 -0700 Subject: [PATCH] Patch around using PATH_MAX in flower/file-name.cc to have builds work on hurd (hopefully). --- debian/changelog | 2 ++ flower/file-name.cc | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 7463e562d1..c47b10a7fd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ lilypond (2.16.2-2) unstable; urgency=low * Fix bad syntax in texinfo documentation exposed by texinfo >= 5.1 (closes: #707190) + * Patch around using PATH_MAX in flower/file-name.cc to have builds work + on hurd (hopefully). -- Don Armstrong Wed, 15 May 2013 11:40:14 -0700 diff --git a/flower/file-name.cc b/flower/file-name.cc index c24c0731e4..b2a8c2b54f 100644 --- a/flower/file-name.cc +++ b/flower/file-name.cc @@ -96,9 +96,13 @@ dir_name (string const file_name) string get_working_directory () { +#ifdef _GNU_SOURCE_ + return string (get_current_dir_name()); +#else char cwd[PATH_MAX]; // getcwd returns NULL upon a failure, contents of cwd would be undefined! return string (getcwd (cwd, PATH_MAX)); +#endif } /* Join components to full file_name. */ -- 2.39.5