diff options
author | Lars Koeller <lkoeller@FreeBSD.org> | 2003-10-25 11:24:36 +0000 |
---|---|---|
committer | Lars Koeller <lkoeller@FreeBSD.org> | 2003-10-25 11:24:36 +0000 |
commit | 343e1508a4b8e8a4690333f500045f889a64f0f0 (patch) | |
tree | 0303c64869ea7e00aba424bf874499f5f61dfa2a /sysutils/bacula | |
parent | Fix build on 5.x. (diff) |
o) Fix amd64 build error in src/lib/var.c
Submitted by: Kern Sibbald <kern@sibbald.com>
Notes
Notes:
svn path=/head/; revision=92115
Diffstat (limited to 'sysutils/bacula')
-rw-r--r-- | sysutils/bacula/files/patch-var-64bit | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/sysutils/bacula/files/patch-var-64bit b/sysutils/bacula/files/patch-var-64bit new file mode 100644 index 000000000000..69d6ba73fc87 --- /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); |