X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Fstore.c;h=e8819e3e3f4d10de13b6eeb1123c713dd09ab2c6;hb=a57492a480bce6d41dec5255d4a55550aa9d4f87;hp=ad4da3c2e5faf4a794f33c7b6d2972f7be2b2745;hpb=0415468df326fefc339a936e47479ff0cf197092;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/store.c b/src/src/store.c index ad4da3c2e..e8819e3e3 100644 --- a/src/src/store.c +++ b/src/src/store.c @@ -255,14 +255,11 @@ log_write(0, LOG_MAIN|LOG_PANIC_DIE, "Taint mismatch, %s: %s %d\n", void store_writeprotect(int pool) { +#if !defined(COMPILE_UTILITY) && !defined(MISSING_POSIX_MEMALIGN) for (storeblock * b = chainbase[pool]; b; b = b->next) - { -#ifndef COMPILE_UTILITY if (mprotect(b, ALIGNED_SIZEOF_STOREBLOCK + b->length, PROT_READ) != 0) - DEBUG(D_any) debug_printf("config block mprotect: (%d) %s\n", errno, strerror(errno)) + DEBUG(D_any) debug_printf("config block mprotect: (%d) %s\n", errno, strerror(errno)); #endif - ; - } } /******************************************************************************/ @@ -346,12 +343,14 @@ if (size > yield_length[pool]) if (++nblocks[pool] > maxblocks[pool]) maxblocks[pool] = nblocks[pool]; +#ifndef MISSING_POSIX_MEMALIGN if (pool == POOL_CONFIG) { long pgsize = sysconf(_SC_PAGESIZE); posix_memalign((void **)&newblock, pgsize, (mlength + pgsize - 1) & ~(pgsize - 1)); } else +#endif newblock = internal_store_malloc(mlength, func, linenumber); newblock->next = NULL; newblock->length = length;