From 48d8e3721ecf04744e7b3e9f72cd2b269e036fc0 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 26 Jan 2013 14:13:12 -0500 Subject: buildsys: gen_bits_syscall_h: do not leave undefined SYS_xxx around If we end up doing '#undef __NR_xxx', we don't want to leave the corresponding SYS_xxx symbol defined. So undef it too. For example, with the ARM EABI layer, we have a bunch of legacy syscalls that we define early on and then later undefine (such as __NR_utime). But we left SYS_utime defined so code that tests for that define before using it would be broken (since it'd be defined to a non-existent symbol). URL: https://bugs.gentoo.org/425006 Signed-off-by: Mike Frysinger --- extra/scripts/gen_bits_syscall_h.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extra/scripts/gen_bits_syscall_h.sh b/extra/scripts/gen_bits_syscall_h.sh index 4345388f4..c44cd8fa4 100755 --- a/extra/scripts/gen_bits_syscall_h.sh +++ b/extra/scripts/gen_bits_syscall_h.sh @@ -50,7 +50,8 @@ EOF sed -n -r -e 's/^UCLIBC(__ARM_NR_|__NR_)([A-Za-z0-9_]*) *(.*)/#undef \1\2\ #define \1\2 \3\ #define SYS_\2 \1\2/gp' \ - -e 's/^UNDEFUCLIBC(__ARM_NR_|__NR_)([A-Za-z0-9_]*).*/#undef \1\2/gp' + -e 's/^UNDEFUCLIBC(__ARM_NR_|__NR_)([A-Za-z0-9_]*).*/#undef \1\2\ +#undef SYS_\2/gp' cat <<-EOF #endif -- cgit v1.2.3