diff options
Diffstat (limited to 'main/cryptsetup/strerror_r.patch')
-rw-r--r-- | main/cryptsetup/strerror_r.patch | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/main/cryptsetup/strerror_r.patch b/main/cryptsetup/strerror_r.patch deleted file mode 100644 index 6dde3d514a..0000000000 --- a/main/cryptsetup/strerror_r.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/src/utils_tools.c b/src/utils_tools.c -index 4e8b0b4..1b4f3e5 100644 ---- a/src/utils_tools.c -+++ b/src/utils_tools.c -@@ -176,11 +176,18 @@ void show_status(int errcode) - crypt_get_error(error, sizeof(error)); - - if (!error[0]) { -+#if defined(__GLIBC__) -+ /* GNU libc strerror_r is non-portable. */ - error_ = strerror_r(-errcode, error, sizeof(error)); - if (error_ != error) { - strncpy(error, error_, sizeof(error)); - error[sizeof(error) - 1] = '\0'; - } -+#else -+ /* POSIX variant */ -+ if (strerror_r(-errcode, error, sizeof(error)) != 0) -+ error[0] = '\0'; -+#endif - } - - log_err(_("Command failed with code %i"), -errcode); |