From fccc4f7bb6299901962cedcceca02c34c8ebfccc Mon Sep 17 00:00:00 2001 From: lkoeller Date: Sat, 25 Oct 2003 11:24:36 +0000 Subject: o) Fix amd64 build error in src/lib/var.c Submitted by: Kern Sibbald --- sysutils/bacula-server/files/patch-var-64bit | 25 +++++++++++++++++++++++++ sysutils/bacula/files/patch-var-64bit | 25 +++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 sysutils/bacula-server/files/patch-var-64bit create mode 100644 sysutils/bacula/files/patch-var-64bit (limited to 'sysutils') 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); -- cgit v1.1