diff options
author | joerg <joerg@pkgsrc.org> | 2013-11-06 16:00:05 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2013-11-06 16:00:05 +0000 |
commit | 37bcedac568559e3e0ec5e909bcfcce60ffdcdd6 (patch) | |
tree | ced8b50c5d0a00f5020b6ff8abeb9b8ecbb89deb /sysutils/bacula | |
parent | 3ee26bbbde89aa1b7f97e1bfd0e8d6458145353a (diff) | |
download | pkgsrc-37bcedac568559e3e0ec5e909bcfcce60ffdcdd6.tar.gz |
Fix sizeof use in internal MD5_Final. Kill non-global replacements for
new/delete only used in a test case to unbreak build with current clang.
Diffstat (limited to 'sysutils/bacula')
-rw-r--r-- | sysutils/bacula/Makefile.common | 6 | ||||
-rw-r--r-- | sysutils/bacula/distinfo | 4 | ||||
-rw-r--r-- | sysutils/bacula/patches/patch-src_lib_md5.c | 13 | ||||
-rw-r--r-- | sysutils/bacula/patches/patch-src_plugins_fd_fd__common.h | 54 |
4 files changed, 72 insertions, 5 deletions
diff --git a/sysutils/bacula/Makefile.common b/sysutils/bacula/Makefile.common index 8aee85860d3..b35864a951d 100644 --- a/sysutils/bacula/Makefile.common +++ b/sysutils/bacula/Makefile.common @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.common,v 1.62 2013/07/15 02:02:28 ryoon Exp $ +# $NetBSD: Makefile.common,v 1.63 2013/11/06 16:00:05 joerg Exp $ # # used by sysutils/bacula-clientonly/Makefile # used by sysutils/bacula-tray-monitor/Makefile @@ -73,9 +73,7 @@ PTHREAD_OPTS+= require PTHREAD_AUTO_VARS= yes EXAMPLESDIR= ${PREFIX}/share/examples/bacula - -pre-install: - ${INSTALL_DATA_DIR} ${DESTDIR}${EXAMPLESDIR} +INSTALLATION_DIRS+= ${EXAMPLESDIR} .include "../../mk/readline.buildlink3.mk" .include "../../devel/zlib/buildlink3.mk" diff --git a/sysutils/bacula/distinfo b/sysutils/bacula/distinfo index 326a21b431e..5ad564ec5bb 100644 --- a/sysutils/bacula/distinfo +++ b/sysutils/bacula/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.47 2012/10/06 17:54:53 christos Exp $ +$NetBSD: distinfo,v 1.48 2013/11/06 16:00:05 joerg Exp $ SHA1 (bacula-5.2.12.tar.gz) = c53cdd185f5f4075ddcca0971953319a94276c84 RMD160 (bacula-5.2.12.tar.gz) = dd5b9f457a524acd9cdbbe0c4842670c4ee5bd5a @@ -15,7 +15,9 @@ SHA1 (patch-src_dird_Makefile.in) = fdce18aca972f26f16af90283756cd5bf5ad5831 SHA1 (patch-src_filed_Makefile.in) = c88ee648ef33c3f7c3a02b77b1d3fc3da8da088d SHA1 (patch-src_findlib_attribs.c) = a0917e500d7e937164cf59917cabd992512acd1d SHA1 (patch-src_lib_attr.c) = 287851ff2ce2a0868d597cf1d7471a6766f6f7c1 +SHA1 (patch-src_lib_md5.c) = a359bb9988538f02d5a14bf3ddac23f7ea64bea6 SHA1 (patch-src_plugins_fd_Makefile.in) = f1316cdbb66d9bc55d8adbd4b0bbde01443ccd2e +SHA1 (patch-src_plugins_fd_fd__common.h) = 7c8419d4fa7f1fe8a07e2bc2720a4903ff324135 SHA1 (patch-src_qt-console_bat.pro.in) = 8df9381c0b35b5a3dcd237f8c017ae21d88c79ad SHA1 (patch-src_stored_Makefile.in) = 5bee8ea8a7c288a1e4baf372ef79da34c9e35284 SHA1 (patch-src_tools_Makefile.in) = 9fbc8d0f71f34217ea29f6ae04cbd927d5ac275b diff --git a/sysutils/bacula/patches/patch-src_lib_md5.c b/sysutils/bacula/patches/patch-src_lib_md5.c new file mode 100644 index 00000000000..6df58f88512 --- /dev/null +++ b/sysutils/bacula/patches/patch-src_lib_md5.c @@ -0,0 +1,13 @@ +$NetBSD: patch-src_lib_md5.c,v 1.1 2013/11/06 16:00:05 joerg Exp $ + +--- src/lib/md5.c.orig 2013-11-06 15:37:34.000000000 +0000 ++++ src/lib/md5.c +@@ -173,7 +173,7 @@ void MD5Final(unsigned char digest[16], + MD5Transform(ctx->buf, (uint32_t *) ctx->in); + byteReverse((unsigned char *) ctx->buf, 4); + memcpy(digest, ctx->buf, 16); +- memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */ ++ memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */ + } + + diff --git a/sysutils/bacula/patches/patch-src_plugins_fd_fd__common.h b/sysutils/bacula/patches/patch-src_plugins_fd_fd__common.h new file mode 100644 index 00000000000..84c16fd4f76 --- /dev/null +++ b/sysutils/bacula/patches/patch-src_plugins_fd_fd__common.h @@ -0,0 +1,54 @@ +$NetBSD: patch-src_plugins_fd_fd__common.h,v 1.1 2013/11/06 16:00:05 joerg Exp $ + +Replacements for new and delete must be global according to ISO C++. +This file is only used by a test case, so just drop them. + +--- src/plugins/fd/fd_common.h.orig 2013-11-06 15:38:19.000000000 +0000 ++++ src/plugins/fd/fd_common.h +@@ -71,46 +71,6 @@ DLL_IMP_EXP void reallyfree(const char * + #define malloc(s) sm_malloc(__FILE__, __LINE__, (s)) + #define free(o) sm_free(__FILE__, __LINE__, (o)) + +-inline void *operator new(size_t size, char const * file, int line) +-{ +- void *pnew = sm_malloc(file,line, size); +- memset((char *)pnew, 0, size); +- return pnew; +-} +- +-inline void *operator new[](size_t size, char const * file, int line) +-{ +- void *pnew = sm_malloc(file, line, size); +- memset((char *)pnew, 0, size); +- return pnew; +-} +- +-inline void *operator new(size_t size) +-{ +- void *pnew = sm_malloc(__FILE__, __LINE__, size); +- memset((char *)pnew, 0, size); +- return pnew; +-} +- +-inline void *operator new[](size_t size) +-{ +- void *pnew = sm_malloc(__FILE__, __LINE__, size); +- memset((char *)pnew, 0, size); +- return pnew; +-} +- +-#define new new(__FILE__, __LINE__) +- +-inline void operator delete(void *buf) +-{ +- sm_free( __FILE__, __LINE__, buf); +-} +- +-inline void operator delete[] (void *buf) +-{ +- sm_free(__FILE__, __LINE__, buf); +-} +- + #define Dmsg(context, level, ...) bfuncs->DebugMessage(context, __FILE__, __LINE__, level, __VA_ARGS__ ) + #define Jmsg(context, type, ...) bfuncs->JobMessage(context, __FILE__, __LINE__, type, 0, __VA_ARGS__ ) + |