From ebd6d78b9320d286fd7c661e14f6013bbba0e0be Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Tue, 31 Dec 2013 13:46:29 -0800 Subject: [PATCH] move hurd support to a quilt patch --- debian/patches/hurd_file_name_support | 16 ++++++++++++++++ flower/file-name.cc | 4 ---- 2 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 debian/patches/hurd_file_name_support diff --git a/debian/patches/hurd_file_name_support b/debian/patches/hurd_file_name_support new file mode 100644 index 0000000000..8c782a5c37 --- /dev/null +++ b/debian/patches/hurd_file_name_support @@ -0,0 +1,16 @@ +--- lilypond-2.18.0.orig/flower/file-name.cc ++++ lilypond-2.18.0/flower/file-name.cc +@@ -96,9 +96,13 @@ + 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. */ diff --git a/flower/file-name.cc b/flower/file-name.cc index 0ff89b8d87..1746c2c28d 100644 --- a/flower/file-name.cc +++ b/flower/file-name.cc @@ -96,13 +96,9 @@ dir_name (const string &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