aboutsummaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorAlexander Logvinov <avl@FreeBSD.org>2009-09-11 13:41:59 +0000
committerAlexander Logvinov <avl@FreeBSD.org>2009-09-11 13:41:59 +0000
commit6eaf7a345f809f8d5b2f2088e2525f9e0f181301 (patch)
tree5fe87a071b0566542a02f3608865103c771ebfff /sysutils
parent2cfc8a560b6262588cd4b5560a38eb8f8d287f22 (diff)
downloadports-6eaf7a345f809f8d5b2f2088e2525f9e0f181301.tar.gz
ports-6eaf7a345f809f8d5b2f2088e2525f9e0f181301.zip
Notes
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/smartmontools-devel/Makefile4
-rw-r--r--sysutils/smartmontools-devel/files/patch-scsiata.cpp22
-rw-r--r--sysutils/smartmontools/Makefile4
-rw-r--r--sysutils/smartmontools/files/patch-scsiata.cpp22
4 files changed, 48 insertions, 4 deletions
diff --git a/sysutils/smartmontools-devel/Makefile b/sysutils/smartmontools-devel/Makefile
index b3eb776eff85..9b077d4b4aea 100644
--- a/sysutils/smartmontools-devel/Makefile
+++ b/sysutils/smartmontools-devel/Makefile
@@ -7,7 +7,7 @@
PORTNAME= smartmontools
PORTVERSION= 5.38
-PORTREVISION= 7
+PORTREVISION= 8
CATEGORIES= sysutils
MASTER_SITES= SF
@@ -24,7 +24,7 @@ USE_RC_SUBR= smartd
MAN5= smartd.conf.5
MAN8= smartd.8 smartctl.8
-CFLAGS:= ${CFLAGS:S/-O2/-O/}
+CFLAGS:= ${CFLAGS:S/-O2/-O/} -Wno-write-strings
post-patch:
@${REINPLACE_CMD} -e 's| install-initdDATA | |' ${WRKSRC}/Makefile.in
diff --git a/sysutils/smartmontools-devel/files/patch-scsiata.cpp b/sysutils/smartmontools-devel/files/patch-scsiata.cpp
new file mode 100644
index 000000000000..173fd2b26e84
--- /dev/null
+++ b/sysutils/smartmontools-devel/files/patch-scsiata.cpp
@@ -0,0 +1,22 @@
+--- scsiata.cpp.orig 2007-12-02 19:14:20.000000000 -0700
++++ scsiata.cpp 2009-09-04 14:27:48.000000000 -0600
+@@ -380,14 +380,14 @@
+ return 1, else 0 */
+ int has_sat_pass_through(int device, int packet_interface)
+ {
+- char data[512];
++ int ret;
++ char *data = (char *)malloc(512); // (alignment)
+ smart_command_set command;
+
+ command = packet_interface ? PIDENTIFY : IDENTIFY;
+- if (0 == sat_command_interface(device, command, 0, data))
+- return 1;
+- else
+- return 0;
++ ret = ( 0 == sat_command_interface(device, command, 0, data) ? 1 : 0 );
++ free(data);
++ return ret;
+ }
+
+ /* Next two functions are borrowed from sg_lib.c in the sg3_utils
diff --git a/sysutils/smartmontools/Makefile b/sysutils/smartmontools/Makefile
index b3eb776eff85..9b077d4b4aea 100644
--- a/sysutils/smartmontools/Makefile
+++ b/sysutils/smartmontools/Makefile
@@ -7,7 +7,7 @@
PORTNAME= smartmontools
PORTVERSION= 5.38
-PORTREVISION= 7
+PORTREVISION= 8
CATEGORIES= sysutils
MASTER_SITES= SF
@@ -24,7 +24,7 @@ USE_RC_SUBR= smartd
MAN5= smartd.conf.5
MAN8= smartd.8 smartctl.8
-CFLAGS:= ${CFLAGS:S/-O2/-O/}
+CFLAGS:= ${CFLAGS:S/-O2/-O/} -Wno-write-strings
post-patch:
@${REINPLACE_CMD} -e 's| install-initdDATA | |' ${WRKSRC}/Makefile.in
diff --git a/sysutils/smartmontools/files/patch-scsiata.cpp b/sysutils/smartmontools/files/patch-scsiata.cpp
new file mode 100644
index 000000000000..173fd2b26e84
--- /dev/null
+++ b/sysutils/smartmontools/files/patch-scsiata.cpp
@@ -0,0 +1,22 @@
+--- scsiata.cpp.orig 2007-12-02 19:14:20.000000000 -0700
++++ scsiata.cpp 2009-09-04 14:27:48.000000000 -0600
+@@ -380,14 +380,14 @@
+ return 1, else 0 */
+ int has_sat_pass_through(int device, int packet_interface)
+ {
+- char data[512];
++ int ret;
++ char *data = (char *)malloc(512); // (alignment)
+ smart_command_set command;
+
+ command = packet_interface ? PIDENTIFY : IDENTIFY;
+- if (0 == sat_command_interface(device, command, 0, data))
+- return 1;
+- else
+- return 0;
++ ret = ( 0 == sat_command_interface(device, command, 0, data) ? 1 : 0 );
++ free(data);
++ return ret;
+ }
+
+ /* Next two functions are borrowed from sg_lib.c in the sg3_utils