diff options
author | Bernhard Voelker <mail@bernhard-voelker.de> | 2022-03-29 01:06:50 +0200 |
---|---|---|
committer | Bernhard Voelker <mail@bernhard-voelker.de> | 2022-03-30 21:55:30 +0200 |
commit | fa7e628e19c75a3650b9010a37f3388758245b68 (patch) | |
tree | 32f6dc0f91970f04ea51f148cf1b86e3db6b53d6 | |
parent | 43679658e2b8ce6b2d073e6cd628d7a502fa280f (diff) | |
download | findutils-fa7e628e19c75a3650b9010a37f3388758245b68.tar.gz |
find: port to Ubuntu 20.04 cross-compiling for OpenWRT 21.02
In the above build environment, HAVE_ENDPWENT seems to be defined to 0
instead of being #undef'ed. Hence the build fails:
parser.c: In function 'parse_user':
parser.c:75:20: error: expected expression before ')' token
75 | # define endpwent ()
| ^
parser.c:2463:7: note: in expansion of macro 'endpwent'
2463 | endpwent ();
| ^~~~~~~~
* find/parser.c (HAVE_ENDGRENT,HAVE_ENDPWENT): Change from #ifndef to
"#if !", and define the replacement code to "(void) 0".
Fixes https://github.com/openwrt/packages/issues/17912
-rw-r--r-- | find/parser.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/find/parser.c b/find/parser.c index c728fd6b..5b5e52a2 100644 --- a/find/parser.c +++ b/find/parser.c @@ -67,12 +67,12 @@ #include "findutils-version.h" #include "system.h" - -#ifndef HAVE_ENDGRENT -# define endgrent () +#if ! HAVE_ENDGRENT +# define endgrent() ((void) 0) #endif -#ifndef HAVE_ENDPWENT -# define endpwent () + +#if ! HAVE_ENDPWENT +# define endpwent() ((void) 0) #endif static bool parse_accesscheck (const struct parser_table*, char *argv[], int *arg_ptr); |