aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/dd_rescue/files
diff options
context:
space:
mode:
authornobutaka <nobutaka@FreeBSD.org>2014-01-19 09:12:23 +0800
committernobutaka <nobutaka@FreeBSD.org>2014-01-19 09:12:23 +0800
commita31cf330ce700ddc1a1d1da04a7facea13b1b81f (patch)
tree91dda4ed85226a9393314e5785885e1864ff4bb4 /sysutils/dd_rescue/files
parent534f07f120f89c09abd1ab95fd561b65a0143264 (diff)
downloadfreebsd-ports-gnome-a31cf330ce700ddc1a1d1da04a7facea13b1b81f.tar.gz
freebsd-ports-gnome-a31cf330ce700ddc1a1d1da04a7facea13b1b81f.tar.zst
freebsd-ports-gnome-a31cf330ce700ddc1a1d1da04a7facea13b1b81f.zip
Update to 1.40.
Diffstat (limited to 'sysutils/dd_rescue/files')
-rw-r--r--sysutils/dd_rescue/files/patch-Makefile29
-rw-r--r--sysutils/dd_rescue/files/patch-dd_rescue.c24
-rw-r--r--sysutils/dd_rescue/files/patch-find_nonzero.h10
3 files changed, 55 insertions, 8 deletions
diff --git a/sysutils/dd_rescue/files/patch-Makefile b/sysutils/dd_rescue/files/patch-Makefile
index 4cca0e9eb74a..9279a559bad7 100644
--- a/sysutils/dd_rescue/files/patch-Makefile
+++ b/sysutils/dd_rescue/files/patch-Makefile
@@ -1,19 +1,23 @@
---- Makefile.orig 2013-01-25 15:02:54.000000000 +0900
-+++ Makefile 2013-01-27 02:37:02.000000000 +0900
+--- Makefile.orig 2013-08-13 06:29:50.000000000 +0900
++++ Makefile 2014-01-18 17:48:01.000000000 +0900
@@ -6,10 +6,6 @@
DESTDIR =
-CC = gcc
-RPM_OPT_FLAGS = -Os -Wall -g
--CFLAGS = $(RPM_OPT_FLAGS) $(EXTRA_CFLAGS)
+-CFLAGS = $(RPM_OPT_FLAGS) $(EXTRA_CFLAGS) -DHAVE_CONFIG_H
-CFLAGS_OPT = $(CFLAGS) -O3
INSTALL = install
INSTALLFLAGS = -s
prefix = $(DESTDIR)/usr
-@@ -26,12 +22,6 @@
- DEFINES = -DVERSION=\"$(VERSION)\" -D__COMPILER__="\"$(COMPILER)\""
- OUT = -o $@
+@@ -26,15 +22,9 @@
+ INSTASROOT = -o root -g root
+ LIBDIR = /usr/lib
+ COMPILER = $(shell $(CC) --version | head -n1)
+-DEFINES = -DVERSION=\"$(VERSION)\" -D__COMPILER__="\"$(COMPILER)\""
++DEFINES = -DVERSION=\"$(VERSION)\" -D__COMPILER__="\"$(COMPILER)\"" -DHAVE_CONFIG_H
+ OUT = -o dd_rescue
-ifeq ($(CC),wcl386)
- CFLAGS = "-ox -wx $(EXTRA_CFLAGS)"
@@ -21,6 +25,15 @@
- OUT = ""
-endif
-
- default: $(TARGETS)
+ MACH := $(shell uname -m | tr A-Z a-z | sed 's/i[3456]86/i386/')
+
+ ifeq ($(MACH),i386)
+@@ -75,7 +65,7 @@
+ $(CC) $(CFLAGS) -DNO_LIBDL $(DEFINES) $< $(OUT) $(OBJECTS) $(LIBDIR)/libfallocate.a
+
+ dd_rescue: dd_rescue.c $(HEADERS) $(OBJECTS)
+- $(CC) $(CFLAGS) $(DEFINES) $< $(OUT) $(OBJECTS) -ldl
++ $(CC) $(CFLAGS) $(DEFINES) $< $(OUT) $(OBJECTS)
+
+ libfalloc-dl: dd_rescue
- frandom.o: frandom.c
diff --git a/sysutils/dd_rescue/files/patch-dd_rescue.c b/sysutils/dd_rescue/files/patch-dd_rescue.c
new file mode 100644
index 000000000000..714b05cc1d54
--- /dev/null
+++ b/sysutils/dd_rescue/files/patch-dd_rescue.c
@@ -0,0 +1,24 @@
+--- dd_rescue.c.orig 2014-01-18 19:02:26.000000000 +0900
++++ dd_rescue.c 2014-01-18 19:02:39.000000000 +0900
+@@ -1848,7 +1848,9 @@
+
+ const char* retstrdupcat3(const char* dir, char dirsep, const char* inm)
+ {
+- char* ibase = basename(strdupa(inm));
++ char* str = alloca(strlen(inm) + 1);
++ strcpy(str, inm);
++ char* ibase = basename(str);
+ const int dlen = strlen(dir) + (dirsep>0? 1: dirsep);
+ char* ret = (char*)malloc(dlen + strlen(inm) + 1);
+ strcpy(ret, dir);
+@@ -1867,7 +1869,9 @@
+ {
+ size_t oln = strlen(onm);
+ if (!strcmp(onm, ".")) {
+- char* ret = strdup(basename(strdupa(iname)));
++ char* str = alloca(strlen(iname) + 1);
++ strcpy(str, iname);
++ char* ret = strdup(basename(str));
+ LISTAPPEND(freenames, ret, charp);
+ return ret;
+ }
diff --git a/sysutils/dd_rescue/files/patch-find_nonzero.h b/sysutils/dd_rescue/files/patch-find_nonzero.h
new file mode 100644
index 000000000000..71198d554037
--- /dev/null
+++ b/sysutils/dd_rescue/files/patch-find_nonzero.h
@@ -0,0 +1,10 @@
+--- find_nonzero.h.orig 2014-01-18 17:32:44.000000000 +0900
++++ find_nonzero.h 2014-01-18 17:33:03.000000000 +0900
+@@ -12,6 +12,7 @@
+
+ #include <string.h>
+ #include <sys/types.h>
++#include <stdint.h>
+
+ #ifdef HAVE_FFS
+ # define myffs(x) ffs(x)