Skip to content

Commit

Permalink
force 1 byte reads for od
Browse files Browse the repository at this point in the history
  • Loading branch information
omoerbeek committed Dec 11, 2020
1 parent 9c1f9f4 commit e1d66be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pdns/incfiles
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ for a in $@
do
c=$(echo $a | tr "/.-" "___")
echo "static const unsigned char ${c}Data[] = {"
od -v -t x "$a" | sed 's/^[0-7]*//' | sed 's/\([0-9a-f][0-9a-f]\)/0x\1,/g'
od -v -t x1 "$a" | sed 's/^[0-7]*//' | sed 's/\([0-9a-f][0-9a-f]\)/0x\1,/g'
echo "};"
echo "static const string g_$c{(const char*)${c}Data, sizeof(${c}Data)};"
done

0 comments on commit e1d66be

Please sign in to comment.