syslinux: Fix failed loading on gcc5
This commit is contained in:
parent
9eae9dd811
commit
06e146b2ce
@ -8,7 +8,8 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "03l5iifwlg1wyb4yh98i0b7pd4j55a1c9y74q1frs47a5dnrilr6";
|
||||
};
|
||||
|
||||
patches = [ ./perl-deps.patch ];
|
||||
# gcc5-fix should be in 6.04+, so remove if it fails to apply.
|
||||
patches = [ ./perl-deps.patch ./gcc5-fix.patch ];
|
||||
|
||||
buildInputs = [ nasm perl libuuid ];
|
||||
|
||||
|
26
pkgs/os-specific/linux/syslinux/gcc5-fix.patch
Normal file
26
pkgs/os-specific/linux/syslinux/gcc5-fix.patch
Normal file
@ -0,0 +1,26 @@
|
||||
diff --git a/com32/include/menu.h b/com32/include/menu.h
|
||||
index bc0182f..b0251e4 100644
|
||||
--- a/com32/include/menu.h
|
||||
+++ b/com32/include/menu.h
|
||||
@@ -195,7 +195,7 @@ void local_cursor_enable(bool);
|
||||
|
||||
static inline int my_isspace(char c)
|
||||
{
|
||||
- return (unsigned char)c <= ' ';
|
||||
+ return (unsigned char)c <= ' ' || (unsigned char)c == '\x7f';
|
||||
}
|
||||
|
||||
int my_isxdigit(char c);
|
||||
diff --git a/com32/menu/readconfig.c b/com32/menu/readconfig.c
|
||||
index b7814be..a433fad 100644
|
||||
--- a/com32/menu/readconfig.c
|
||||
+++ b/com32/menu/readconfig.c
|
||||
@@ -299,7 +299,7 @@ static char *copy_sysappend_string(char *dst, const char *src)
|
||||
char c;
|
||||
|
||||
while ((c = *src++)) {
|
||||
- if (c <= ' ' && c == '\x7f') {
|
||||
+ if (my_isspace(c)) {
|
||||
if (!was_space)
|
||||
*dst++ = '_';
|
||||
was_space = true;
|
Loading…
Reference in New Issue
Block a user