diff options
author | Kenneth Chan <kenneth.t.chan@gmail.com> | 2020-09-04 00:43:53 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2020-09-04 00:43:53 +0700 |
commit | fa72d5a17504e50b80eface976f7956405eb4cba (patch) | |
tree | 4a8028eb4be8e3d1a9d2986452af28fc2153113f /system/sleepd/fix_acpica_version.patch | |
parent | 24cdd6a3fe58a21a5a6eb3ecfc444712b0e8b398 (diff) | |
download | slackbuilds-fa72d5a17504e50b80eface976f7956405eb4cba.tar.gz |
system/sleepd: Fix bug.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/sleepd/fix_acpica_version.patch')
-rw-r--r-- | system/sleepd/fix_acpica_version.patch | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/system/sleepd/fix_acpica_version.patch b/system/sleepd/fix_acpica_version.patch new file mode 100644 index 0000000000..02422ed0be --- /dev/null +++ b/system/sleepd/fix_acpica_version.patch @@ -0,0 +1,12 @@ +diff -uNr sleepd-2.05.orig/acpi.c sleepd-2.05/acpi.c +--- sleepd-2.05.orig/acpi.c 2014-05-28 04:06:50.000000000 +0800 ++++ sleepd-2.05/acpi.c 2020-07-17 22:51:39.340113991 +0800 +@@ -67,7 +67,7 @@ + fd = open(file, O_RDONLY); + if (fd == -1) return NULL; + end = read(fd, buf, sizeof(buf)); +- buf[end-1] = '\0'; ++ ((buf[end-1]) == '\n') && (buf[end-1] = '\0'); + close(fd); + return buf; + } |