diff options
author | Carlo Landmeter <clandmeter@gmail.com> | 2013-01-04 22:28:33 +0100 |
---|---|---|
committer | Carlo Landmeter <clandmeter@gmail.com> | 2013-01-04 22:28:33 +0100 |
commit | 1e191108cef16f3b7afa60c05545e614ed4a7ec9 (patch) | |
tree | 42637c6c76d5bf6e54779633ad83646f2fd75266 /main/eboard | |
parent | 5521a5f57f91e75ba77e127eccd08a9a833417bb (diff) | |
download | aports-1e191108cef16f3b7afa60c05545e614ed4a7ec9.tar.bz2 aports-1e191108cef16f3b7afa60c05545e614ed4a7ec9.tar.xz |
main/eboard: fix build on eglibc
Diffstat (limited to 'main/eboard')
-rw-r--r-- | main/eboard/APKBUILD | 6 | ||||
-rw-r--r-- | main/eboard/eboard-const-safety.patch | 37 |
2 files changed, 41 insertions, 2 deletions
diff --git a/main/eboard/APKBUILD b/main/eboard/APKBUILD index 2fc11ca7a..a30231dbb 100644 --- a/main/eboard/APKBUILD +++ b/main/eboard/APKBUILD @@ -13,7 +13,8 @@ install="" subpackages="$pkgname-dev $pkgname-doc" source="http://prdownloads.sourceforge.net/eboard/eboard-$pkgver.tar.bz2 eboard-libpng-1.5.patch - eboard.desktop" + eboard.desktop + eboard-const-safety.patch" _builddir="$srcdir"/eboard-$pkgver prepare() { @@ -44,4 +45,5 @@ package() { md5sums="03dcdaa2bc85218b1b18c4bee276fea7 eboard-1.1.1.tar.bz2 349dd8db4cca191925b9d30fb0da837b eboard-libpng-1.5.patch -70f985b6841c2e6374555a5a4c0cca79 eboard.desktop" +70f985b6841c2e6374555a5a4c0cca79 eboard.desktop +9d2c97f724a083de7f39a4b3e87f22fe eboard-const-safety.patch" diff --git a/main/eboard/eboard-const-safety.patch b/main/eboard/eboard-const-safety.patch new file mode 100644 index 000000000..de275c3bb --- /dev/null +++ b/main/eboard/eboard-const-safety.patch @@ -0,0 +1,37 @@ +--- eboard-1.1.1.orig/ntext.cc ++++ eboard-1.1.1/ntext.cc +@@ -237,6 +237,7 @@ + void NText::append(const char *text, int len, int color) { + int i; + NLine *nl; ++ char buf[len + 1]; + char *p; + + if (len < 0) { +@@ -244,11 +245,14 @@ + return; + } + +- p = strchr(text, '\n'); ++ strncpy(buf, text, len); ++ buf[len] = '\0'; ++ ++ p = strchr(buf, '\n'); + if (p!=NULL) { + *p = 0; +- i = strlen(text); +- nl = new NLine(text, color); ++ i = strlen(buf); ++ nl = new NLine(buf, color); + *p = '\n'; + lines.push_back(nl); + formatLine(lines.size()-1); +@@ -257,7 +261,7 @@ + } + + // if search for \n failed, this is a single line +- nl = new NLine(text, color); ++ nl = new NLine(buf, color); + lines.push_back(nl); + formatLine(lines.size()-1); + discardExcess(); |