Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions libresource/ResourceTypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
#include "utils/String16.h"
#include "utils/String8.h"

#ifdef __TERMUX__
#undef __ANDROID__
#endif
#ifdef __ANDROID__
#include <binder/TextOutput.h>
#endif
Expand Down
4 changes: 2 additions & 2 deletions libresource/utils/TypeHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ template<typename TYPE>
typename std::enable_if<use_trivial_move<TYPE>::value>::type
inline
move_forward_type(TYPE* d, const TYPE* s, size_t n = 1) {
memmove(d, s, n*sizeof(TYPE));
memmove((void *)d, (void *)s, n*sizeof(TYPE));
}

template<typename TYPE>
Expand All @@ -222,7 +222,7 @@ template<typename TYPE>
typename std::enable_if<use_trivial_move<TYPE>::value>::type
inline
move_backward_type(TYPE* d, const TYPE* s, size_t n = 1) {
memmove(d, s, n*sizeof(TYPE));
memmove((void *)d, (void *)s, n*sizeof(TYPE));
}

template<typename TYPE>
Expand Down
8 changes: 7 additions & 1 deletion selfextract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

export TMPDIR=`mktemp -d /tmp/redex.XXXXXX`
TERMUX_TMP=""
if pwd | grep -q "termux"; then
TERMUX_TMP="/data/data/com.termux/cache"
mkdir -p $TERMUX_TMP/tmp
fi

export TMPDIR=`mktemp -d "$TERMUX_TMP/tmp/redex.XXXXXX"`
ARCHIVE=`awk '/^__ARCHIVE_BELOW__/ { print NR + 1; exit 0 }' $0`
tail -n+$ARCHIVE $0 | tar xz -C $TMPDIR

Expand Down
2 changes: 1 addition & 1 deletion tools/redexdump/RedexDump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ int main(int argc, char* argv[]) {
uint32_t ddebug_offset = 0;
int no_headers = 0;

char c;
int c;
static const struct option options[] = {
{"all", no_argument, nullptr, 'a'},
{"string", no_argument, nullptr, 's'},
Expand Down