fix: populate ldns submodule and add autotools to LDNS build stage
- Re-cloned zonemaster-ldns with --recurse-submodules so the bundled ldns C library source (including Changelog and configure.ac) is present - Added autoconf, automake, libtool to Dockerfile.backend ldns-build stage so libtoolize + autoreconf can generate ldns/configure during make Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
43
zonemaster-ldns/ldns/compat/memmove.c
Normal file
43
zonemaster-ldns/ldns/compat/memmove.c
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* memmove.c: memmove compat implementation.
|
||||
*
|
||||
* Copyright (c) 2001-2008, NLnet Labs. All rights reserved.
|
||||
*
|
||||
* See LICENSE for the license.
|
||||
*/
|
||||
|
||||
#include <ldns/config.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void *memmove(void *dest, const void *src, size_t n);
|
||||
|
||||
void *memmove(void *dest, const void *src, size_t n)
|
||||
{
|
||||
uint8_t* from = (uint8_t*) src;
|
||||
uint8_t* to = (uint8_t*) dest;
|
||||
|
||||
if (from == to || n == 0)
|
||||
return dest;
|
||||
if (to > from && to-from < (int)n) {
|
||||
/* to overlaps with from */
|
||||
/* <from......> */
|
||||
/* <to........> */
|
||||
/* copy in reverse, to avoid overwriting from */
|
||||
int i;
|
||||
for(i=n-1; i>=0; i--)
|
||||
to[i] = from[i];
|
||||
return dest;
|
||||
}
|
||||
if (from > to && from-to < (int)n) {
|
||||
/* to overlaps with from */
|
||||
/* <from......> */
|
||||
/* <to........> */
|
||||
/* copy forwards, to avoid overwriting from */
|
||||
size_t i;
|
||||
for(i=0; i<n; i++)
|
||||
to[i] = from[i];
|
||||
return dest;
|
||||
}
|
||||
memcpy(dest, src, n);
|
||||
return dest;
|
||||
}
|
||||
Reference in New Issue
Block a user