diff options
author | Chris Lord <chris@openedhand.com> | 2006-08-17 15:19:29 +0000 |
---|---|---|
committer | Chris Lord <chris@openedhand.com> | 2006-08-17 15:19:29 +0000 |
commit | 22a7b205e4337895e6eaad5eeba596245a22bfe7 (patch) | |
tree | c00fc89bd0617cea041edc7f8fa45762a5da609f /meta/packages/coreutils | |
parent | d58cfb05fa0b8d6bf93f435713995b46616330cc (diff) | |
download | poky-22a7b205e4337895e6eaad5eeba596245a22bfe7.tar.gz |
Add patch to rename eaccess function in coreutils-native so it doesn't
conflict with any system-provided eaccess.
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@610 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/coreutils')
-rw-r--r-- | meta/packages/coreutils/coreutils-5.1.3/rename-eaccess.patch | 44 | ||||
-rw-r--r-- | meta/packages/coreutils/coreutils_5.1.3.bb | 5 |
2 files changed, 47 insertions, 2 deletions
diff --git a/meta/packages/coreutils/coreutils-5.1.3/rename-eaccess.patch b/meta/packages/coreutils/coreutils-5.1.3/rename-eaccess.patch new file mode 100644 index 0000000000..cde2731477 --- /dev/null +++ b/meta/packages/coreutils/coreutils-5.1.3/rename-eaccess.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | # On Ubuntu edgy (and perhaps other distributions), eaccess is provided by | ||
2 | # unistd.h - This renames the function so as not to conflict. | ||
3 | |||
4 | --- coreutils-5.1.3/src/test.c.old 2006-08-17 15:29:41.000000000 +0100 | ||
5 | +++ coreutils-5.1.3/src/test.c 2006-08-17 15:30:44.000000000 +0100 | ||
6 | @@ -125,7 +125,7 @@ | ||
7 | /* Do the same thing access(2) does, but use the effective uid and gid. */ | ||
8 | |||
9 | static int | ||
10 | -eaccess (char const *file, int mode) | ||
11 | +_eaccess (char const *file, int mode) | ||
12 | { | ||
13 | static int have_ids; | ||
14 | static uid_t uid, euid; | ||
15 | @@ -158,7 +158,7 @@ | ||
16 | return result; | ||
17 | } | ||
18 | #else | ||
19 | -# define eaccess(F, M) euidaccess (F, M) | ||
20 | +# define _eaccess(F, M) euidaccess (F, M) | ||
21 | #endif | ||
22 | |||
23 | /* Increment our position in the argument list. Check that we're not | ||
24 | @@ -623,17 +623,17 @@ | ||
25 | |||
26 | case 'r': /* file is readable? */ | ||
27 | unary_advance (); | ||
28 | - value = -1 != eaccess (argv[pos - 1], R_OK); | ||
29 | + value = -1 != _eaccess (argv[pos - 1], R_OK); | ||
30 | return (TRUE == value); | ||
31 | |||
32 | case 'w': /* File is writable? */ | ||
33 | unary_advance (); | ||
34 | - value = -1 != eaccess (argv[pos - 1], W_OK); | ||
35 | + value = -1 != _eaccess (argv[pos - 1], W_OK); | ||
36 | return (TRUE == value); | ||
37 | |||
38 | case 'x': /* File is executable? */ | ||
39 | unary_advance (); | ||
40 | - value = -1 != eaccess (argv[pos - 1], X_OK); | ||
41 | + value = -1 != _eaccess (argv[pos - 1], X_OK); | ||
42 | return (TRUE == value); | ||
43 | |||
44 | case 'O': /* File is owned by you? */ | ||
diff --git a/meta/packages/coreutils/coreutils_5.1.3.bb b/meta/packages/coreutils/coreutils_5.1.3.bb index 31af80907d..2f7476c2dd 100644 --- a/meta/packages/coreutils/coreutils_5.1.3.bb +++ b/meta/packages/coreutils/coreutils_5.1.3.bb | |||
@@ -3,11 +3,12 @@ SECTION = "base" | |||
3 | DESCRIPTION = "A collection of core GNU utilities." | 3 | DESCRIPTION = "A collection of core GNU utilities." |
4 | RREPLACES = "textutils shellutils fileutils" | 4 | RREPLACES = "textutils shellutils fileutils" |
5 | RPROVIDES = "textutils shellutils fileutils" | 5 | RPROVIDES = "textutils shellutils fileutils" |
6 | PR = "r7" | 6 | PR = "r8" |
7 | 7 | ||
8 | SRC_URI = "ftp://alpha.gnu.org/gnu/coreutils/coreutils-${PV}.tar.bz2 \ | 8 | SRC_URI = "ftp://alpha.gnu.org/gnu/coreutils/coreutils-${PV}.tar.bz2 \ |
9 | file://install-cross.patch;patch=1;pnum=0 \ | 9 | file://install-cross.patch;patch=1;pnum=0 \ |
10 | file://man.patch;patch=1" | 10 | file://man.patch;patch=1 \ |
11 | file://rename-eaccess.patch;patch=1" | ||
11 | 12 | ||
12 | inherit autotools | 13 | inherit autotools |
13 | 14 | ||