From: Don Armstrong Date: Thu, 16 May 2013 18:46:43 +0000 (-0700) Subject: Patch around using PATH_MAX in flower/file-name.cc to have builds work on hurd (hopef... X-Git-Tag: debian/2.16.2-2^0 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=8734252a0449c1426cfbb971915ee47466bb7153;p=lilypond.git Patch around using PATH_MAX in flower/file-name.cc to have builds work on hurd (hopefully). --- 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. */