aboutsummaryrefslogtreecommitdiffstats
path: root/main/pingu
diff options
context:
space:
mode:
Diffstat (limited to 'main/pingu')
-rw-r--r--main/pingu/APKBUILD14
-rw-r--r--main/pingu/pingu-strncpy.patch12
2 files changed, 25 insertions, 1 deletions
diff --git a/main/pingu/APKBUILD b/main/pingu/APKBUILD
index 2aab349441..fe090da29a 100644
--- a/main/pingu/APKBUILD
+++ b/main/pingu/APKBUILD
@@ -13,6 +13,7 @@ subpackages="$pkgname-doc lua-pingu:_lua mtu"
source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2
0001-pingu_route-allow-default-routes-that-has-no-via-add.patch
pingu.initd
+ pingu-strncpy.patch
"
_builddir="$srcdir"/$pkgname-$pkgver
@@ -31,6 +32,16 @@ build() {
make || return 1
}
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
package() {
cd "$_builddir"
make DESTDIR="$pkgdir" install install-lua
@@ -52,4 +63,5 @@ _lua() {
md5sums="a874d852ae0d8e10f8c22e0008d1b529 pingu-1.2.tar.bz2
dbd6e66d4c9c694fd0436e91555bf750 0001-pingu_route-allow-default-routes-that-has-no-via-add.patch
-70f56b0f506e1c2e725d0ec062667c32 pingu.initd"
+70f56b0f506e1c2e725d0ec062667c32 pingu.initd
+380539ae29d48af4d3958afaf1d2e1d0 pingu-strncpy.patch"
diff --git a/main/pingu/pingu-strncpy.patch b/main/pingu/pingu-strncpy.patch
new file mode 100644
index 0000000000..8b2ee18b1d
--- /dev/null
+++ b/main/pingu/pingu-strncpy.patch
@@ -0,0 +1,12 @@
+--- pingu-1.1.orig/pingu_iface.c
++++ pingu-1.1/pingu_iface.c
+@@ -115,7 +115,7 @@
+ }
+
+ if (name != NULL)
+- strlcpy(iface->name, name, sizeof(iface->name));
++ strncpy(iface->name, name, sizeof(iface->name));
+
+ list_init(&iface->ping_list);
+ list_init(&iface->route_list);
+