summaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authorlkoeller <lkoeller@FreeBSD.org>2003-10-25 11:24:36 +0000
committerlkoeller <lkoeller@FreeBSD.org>2003-10-25 11:24:36 +0000
commitfccc4f7bb6299901962cedcceca02c34c8ebfccc (patch)
treeefb5db6abe795c9ee78a73d419fad52d29132fce /sysutils
parent5dfbedba82f2239793182517b2f2584aeebeac67 (diff)
downloadFreeBSD-ports-fccc4f7bb6299901962cedcceca02c34c8ebfccc.zip
FreeBSD-ports-fccc4f7bb6299901962cedcceca02c34c8ebfccc.tar.gz
o) Fix amd64 build error in src/lib/var.c
Submitted by: Kern Sibbald <kern@sibbald.com>
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/bacula-server/files/patch-var-64bit25
-rw-r--r--sysutils/bacula/files/patch-var-64bit25
2 files changed, 50 insertions, 0 deletions
diff --git a/sysutils/bacula-server/files/patch-var-64bit b/sysutils/bacula-server/files/patch-var-64bit
new file mode 100644
index 0000000..69d6ba7
--- /dev/null
+++ b/sysutils/bacula-server/files/patch-var-64bit
@@ -0,0 +1,25 @@
+--- src/lib/var.c.orig 2003-10-24 17:31:14.000000000 +0200
++++ src/lib/var.c 2003-10-24 17:30:56.000000000 +0200
+@@ -2605,21 +2605,13 @@
+ const char *fmt, va_list ap)
+ {
+ var_rc_t rc;
+- va_list apbak;
+ char *cpBuf;
+- int nBuf;
++ int nBuf = 5000;
+
+ /* argument sanity checks */
+ if (var == NULL || dst_ptr == NULL || fmt == NULL)
+ return VAR_RC(VAR_ERR_INVALID_ARGUMENT);
+
+- /* determine formatting buffer length */
+- apbak = ap;
+- nBuf = var_mvsnprintf(NULL, 0, fmt, ap);
+- ap = apbak;
+- if (nBuf == -1)
+- return VAR_RC(VAR_ERR_FORMATTING_FAILURE);
+-
+ /* perform formatting */
+ if ((cpBuf = (char *)malloc(nBuf+1)) == NULL)
+ return VAR_RC(VAR_ERR_OUT_OF_MEMORY);
diff --git a/sysutils/bacula/files/patch-var-64bit b/sysutils/bacula/files/patch-var-64bit
new file mode 100644
index 0000000..69d6ba7
--- /dev/null
+++ b/sysutils/bacula/files/patch-var-64bit
@@ -0,0 +1,25 @@
+--- src/lib/var.c.orig 2003-10-24 17:31:14.000000000 +0200
++++ src/lib/var.c 2003-10-24 17:30:56.000000000 +0200
+@@ -2605,21 +2605,13 @@
+ const char *fmt, va_list ap)
+ {
+ var_rc_t rc;
+- va_list apbak;
+ char *cpBuf;
+- int nBuf;
++ int nBuf = 5000;
+
+ /* argument sanity checks */
+ if (var == NULL || dst_ptr == NULL || fmt == NULL)
+ return VAR_RC(VAR_ERR_INVALID_ARGUMENT);
+
+- /* determine formatting buffer length */
+- apbak = ap;
+- nBuf = var_mvsnprintf(NULL, 0, fmt, ap);
+- ap = apbak;
+- if (nBuf == -1)
+- return VAR_RC(VAR_ERR_FORMATTING_FAILURE);
+-
+ /* perform formatting */
+ if ((cpBuf = (char *)malloc(nBuf+1)) == NULL)
+ return VAR_RC(VAR_ERR_OUT_OF_MEMORY);
OpenPOWER on IntegriCloud