From: Otto Moerbeek Date: Wed, 9 Dec 2020 14:33:58 +0000 (+0100) Subject: Stop using incbin and use od & sed to generate constant string data. X-Git-Tag: rec-4.5.0-alpha1~72^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=006c3bef8a172319a585fe8c1243ad375642be1e;p=thirdparty%2Fpdns.git Stop using incbin and use od & sed to generate constant string data. --- diff --git a/pdns/incfiles b/pdns/incfiles index c2a99c0d0e..0cda32e6ac 100755 --- a/pdns/incfiles +++ b/pdns/incfiles @@ -6,6 +6,8 @@ export LANG=C.UTF-8 for a in $@ do c=$(echo $a | tr "/.-" "___") - echo "INCBIN(${c}, \"${a}\");" - echo "static const string g_${c}{(const char*)g${c}Data, g${c}Size};" + echo "static const unsigned char ${c}Data[] = {" + od -v -t x "$a" | sed 's/^[0-9]*//' | sed 's/\([0-9a-f][0-9a-f]\)/0x\1,/g' + echo "0x0 };" + echo "static const string g_$c{(const char*)${c}Data};" done