diff options
author | Brooks Davis <brooks@FreeBSD.org> | 2023-12-09 09:17:00 +0100 |
---|---|---|
committer | Muhammad Moinur Rahman <bofh@FreeBSD.org> | 2023-12-10 15:56:31 +0100 |
commit | c59c5adc46f3c43f00ee2f271018e0d5068578a8 (patch) | |
tree | 414a7c2e9008ee84a897c7d5aaaa1e36de77004c /mail/dbmail/files/patch-src_mpool_mpool.c | |
parent | devel/py-opengrok-tools: Update version 1.10.0=>1.12.23 (diff) |
mail/dbmail: Remove dead sbrk linkage
Differential Revision: https://reviews.freebsd.org/D42973
Diffstat (limited to 'mail/dbmail/files/patch-src_mpool_mpool.c')
-rw-r--r-- | mail/dbmail/files/patch-src_mpool_mpool.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/mail/dbmail/files/patch-src_mpool_mpool.c b/mail/dbmail/files/patch-src_mpool_mpool.c new file mode 100644 index 000000000000..281c65aab0ab --- /dev/null +++ b/mail/dbmail/files/patch-src_mpool_mpool.c @@ -0,0 +1,38 @@ +--- src/mpool/mpool.c.orig ++++ src/mpool/mpool.c +@@ -241,6 +241,7 @@ + (void)printf("allocating %u pages or %lu bytes\n", page_n, size); + #endif + ++#if 0 + if (BIT_IS_SET(mp_p->mp_flags, MPOOL_FLAG_USE_SBRK)) { + mem = sbrk(size); + if (mem == (void *)-1) { +@@ -263,7 +264,9 @@ + mem = (char *)mem + fill; + } + } +- else { ++ else ++#endif ++ { + state = MAP_PRIVATE; + #ifdef MAP_FILE + state |= MAP_FILE; +@@ -937,12 +940,15 @@ + } + } + ++#if 0 + if (BIT_IS_SET(flags, MPOOL_FLAG_USE_SBRK)) { + mp.mp_fd = -1; + mp.mp_addr = NULL; + mp.mp_top = 0; + } +- else { ++ else ++#endif ++ { + /* open dev-zero for our mmaping */ + mp.mp_fd = open("/dev/zero", O_RDWR, 0); + if (mp.mp_fd < 0) { |