1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#! /bin/bash
headers_dir="$1"
cd "${headers_dir}" || exit 1
# Android header fix-ups
## Do not abort compilation at header include time
if grep '^#error "No function renaming possible"' sys/cdefs.h >/dev/null 2>/dev/null; then
awk '
/#error "No function renaming possible"/{
print "#define __RENAME(x) no renaming on this platform"
next
}
{print}
' sys/cdefs.h > sys/cdefs.h.new
cat sys/cdefs.h.new > sys/cdefs.h
rm -f sys/cdefs.h.new
fi
## loff_t depends on __GNUC__ for some reason
if awk -v retval=1 '/__GNUC__/{ getline; if ($0 ~ /__kernel_loff_t/) {retval=0} } END{exit retval}' asm/posix_types.h >/dev/null 2>/dev/null; then
|
|
>
>
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#! /bin/bash
headers_dir="$1"
cd "${headers_dir}" || exit 1
# Android header fix-ups
## Do not abort compilation at header include time
if grep '^#error "No function renaming possible"' sys/cdefs.h >/dev/null 2>/dev/null; then
awk '
/^#error "No function renaming possible"/{
print "#define __RENAME(x) no renaming on this platform"
next
}
{print}
/^#warning /{ next }
' sys/cdefs.h > sys/cdefs.h.new
cat sys/cdefs.h.new > sys/cdefs.h
rm -f sys/cdefs.h.new
fi
## loff_t depends on __GNUC__ for some reason
if awk -v retval=1 '/__GNUC__/{ getline; if ($0 ~ /__kernel_loff_t/) {retval=0} } END{exit retval}' asm/posix_types.h >/dev/null 2>/dev/null; then
|