summaryrefslogtreecommitdiff
path: root/source/n/icmpinfo
diff options
context:
space:
mode:
Diffstat (limited to 'source/n/icmpinfo')
-rw-r--r--source/n/icmpinfo/icmpinfo-1.11-time.diff45
-rwxr-xr-xsource/n/icmpinfo/icmpinfo.SlackBuild12
2 files changed, 53 insertions, 4 deletions
diff --git a/source/n/icmpinfo/icmpinfo-1.11-time.diff b/source/n/icmpinfo/icmpinfo-1.11-time.diff
new file mode 100644
index 00000000..71f8807b
--- /dev/null
+++ b/source/n/icmpinfo/icmpinfo-1.11-time.diff
@@ -0,0 +1,45 @@
+diff -uri icmpinfo-1.11/defs.h icmpinfo-1.11.fixed/defs.h
+--- icmpinfo-1.11/defs.h 1994-05-26 15:36:40.000000000 +0200
++++ icmpinfo-1.11.fixed/defs.h 2008-04-07 20:13:09.000000000 +0200
+@@ -3,10 +3,11 @@
+ */
+
+ #include <stdio.h>
++#include <stdlib.h> /* exit */
+ #include <errno.h>
+ extern int errno;
+
+-#include <sys/time.h>
++#include <time.h>
+ #include <sys/param.h>
+ #include <sys/socket.h>
+ #include <sys/file.h>
+diff -uri icmpinfo-1.11/err.c icmpinfo-1.11.fixed/err.c
+--- icmpinfo-1.11/err.c 1994-04-22 19:44:48.000000000 +0200
++++ icmpinfo-1.11.fixed/err.c 2008-04-07 20:13:47.000000000 +0200
+@@ -1,4 +1,5 @@
+ #include <stdio.h>
++#include <stdlib.h> /* exit */
+
+ extern char *pname;
+
+diff -uri icmpinfo-1.11/pid.c icmpinfo-1.11.fixed/pid.c
+--- icmpinfo-1.11/pid.c 2008-04-07 20:16:58.000000000 +0200
++++ icmpinfo-1.11.fixed/pid.c 2008-04-07 20:14:12.000000000 +0200
+@@ -1,4 +1,5 @@
+ #include <stdio.h>
++#include <stdlib.h> /* exit */
+ #include <signal.h>
+
+ #define PIDFILE "/var/run/icmpinfo.pid"
+diff -uri icmpinfo-1.11/print.c icmpinfo-1.11.fixed/print.c
+--- icmpinfo-1.11/print.c 2008-04-07 20:16:58.000000000 +0200
++++ icmpinfo-1.11.fixed/print.c 2008-04-07 20:15:23.000000000 +0200
+@@ -9,6 +9,7 @@
+ it should be ok, now */
+
+ #include <string.h>
++#include <stddef.h> /* offsetof */
+ #include "defs.h"
+
+ #ifndef ANSI_OFFSETOF
diff --git a/source/n/icmpinfo/icmpinfo.SlackBuild b/source/n/icmpinfo/icmpinfo.SlackBuild
index c783e78f..fb1f9023 100755
--- a/source/n/icmpinfo/icmpinfo.SlackBuild
+++ b/source/n/icmpinfo/icmpinfo.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2015 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,12 +21,12 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
VERSION=1.11
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -43,6 +43,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
+rm -rf icmpinfo-$VERSION
tar xvf $CWD/icmpinfo-$VERSION.tar.gz || exit 1
cd icmpinfo-$VERSION || exit 1
@@ -53,7 +54,10 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-zcat $CWD/icmpinfo-1.11.diff.gz | patch -p1 --backup || exit
+zcat $CWD/icmpinfo-1.11.diff.gz | patch -p1 --backup || exit 1
+
+# Patch to prevent segfault:
+zcat $CWD/icmpinfo-1.11-time.diff.gz | patch -p1 --backup || exit 1
make $NUMJOBS || make || exit 1