diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2012-09-27 11:18:59 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2012-09-27 11:18:59 +0200 |
commit | 4775c18f109cdcce83e9f23b9f6bdc29b7e37dcb (patch) | |
tree | baf6baddfa84812e75b88d27273a97266941b68b /package | |
parent | 9e44b8d762b7cbf44fe2c818edb8f5a72ee1add1 (diff) | |
parent | 580a519f91c726c94cf2098a15473ad47d8ffdc7 (diff) |
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Diffstat (limited to 'package')
-rw-r--r-- | package/busybox/patches/011-utmp-segfault-mips64-fix.patch | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/package/busybox/patches/011-utmp-segfault-mips64-fix.patch b/package/busybox/patches/011-utmp-segfault-mips64-fix.patch new file mode 100644 index 000000000..428ffca38 --- /dev/null +++ b/package/busybox/patches/011-utmp-segfault-mips64-fix.patch @@ -0,0 +1,20 @@ +diff -Nur busybox-1.20.2.orig/libbb/utmp.c busybox-1.20.2/libbb/utmp.c +--- busybox-1.20.2.orig/libbb/utmp.c 2012-06-26 15:35:45.000000000 +0200 ++++ busybox-1.20.2/libbb/utmp.c 2012-09-24 20:25:27.000000000 +0200 +@@ -10,8 +10,14 @@ + + static void touch(const char *filename) + { +- if (access(filename, R_OK | W_OK) == -1) +- close(open(filename, O_WRONLY | O_CREAT, 0664)); ++ int c = 0; ++ ++ if (access(filename, R_OK | W_OK) == -1) { ++ c=open(filename, O_WRONLY | O_CREAT, 0664); ++ if (c > 0) { ++ close(c); ++ } ++ } + } + + void FAST_FUNC write_new_utmp(pid_t pid, int new_type, const char *tty_name, const char *username, const char *hostname) |