Declare getdelim(3) if it exists in libc but is not prototyped in stdio.h.
This can happen on systems with a gcc packages that was built on and older versions of the OS where getdelim(3) was not present.
This commit is contained in:
@@ -107,6 +107,10 @@
|
|||||||
*/
|
*/
|
||||||
#undef HAVE_DECL_ERRNO
|
#undef HAVE_DECL_ERRNO
|
||||||
|
|
||||||
|
/* Define to 1 if you have the declaration of `getdelim', and to 0 if you
|
||||||
|
don't. */
|
||||||
|
#undef HAVE_DECL_GETDELIM
|
||||||
|
|
||||||
/* Define to 1 if you have the declaration of `getdomainname', and to 0 if you
|
/* Define to 1 if you have the declaration of `getdomainname', and to 0 if you
|
||||||
don't. */
|
don't. */
|
||||||
#undef HAVE_DECL_GETDOMAINNAME
|
#undef HAVE_DECL_GETDOMAINNAME
|
||||||
|
13
configure
vendored
13
configure
vendored
@@ -19901,6 +19901,19 @@ if test "x$ac_cv_func_getdelim" = xyes; then :
|
|||||||
#define HAVE_GETDELIM 1
|
#define HAVE_GETDELIM 1
|
||||||
_ACEOF
|
_ACEOF
|
||||||
|
|
||||||
|
# Out of date gcc fixed includes may result in missing getdelim() prototype
|
||||||
|
ac_fn_c_check_decl "$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "$ac_includes_default"
|
||||||
|
if test "x$ac_cv_have_decl_getdelim" = xyes; then :
|
||||||
|
ac_have_decl=1
|
||||||
|
else
|
||||||
|
ac_have_decl=0
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat >>confdefs.h <<_ACEOF
|
||||||
|
#define HAVE_DECL_GETDELIM $ac_have_decl
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
case " $LIBOBJS " in
|
case " $LIBOBJS " in
|
||||||
|
@@ -2680,7 +2680,10 @@ AC_CHECK_FUNCS([getgrouplist], [], [
|
|||||||
esac
|
esac
|
||||||
SUDO_APPEND_COMPAT_EXP(sudo_getgrouplist)
|
SUDO_APPEND_COMPAT_EXP(sudo_getgrouplist)
|
||||||
])
|
])
|
||||||
AC_CHECK_FUNCS([getdelim], [], [
|
AC_CHECK_FUNCS([getdelim], [
|
||||||
|
# Out of date gcc fixed includes may result in missing getdelim() prototype
|
||||||
|
AC_CHECK_DECLS([getdelim])
|
||||||
|
], [
|
||||||
AC_LIBOBJ(getdelim)
|
AC_LIBOBJ(getdelim)
|
||||||
SUDO_APPEND_COMPAT_EXP(sudo_getdelim)
|
SUDO_APPEND_COMPAT_EXP(sudo_getdelim)
|
||||||
COMPAT_TEST_PROGS="${COMPAT_TEST_PROGS}${COMPAT_TEST_PROGS+ }getdelim_test"
|
COMPAT_TEST_PROGS="${COMPAT_TEST_PROGS}${COMPAT_TEST_PROGS+ }getdelim_test"
|
||||||
|
@@ -446,10 +446,13 @@ __dso_public int sudo_getgrouplist(const char *name, GETGROUPS_T basegid, GETGRO
|
|||||||
# undef getgrouplist
|
# undef getgrouplist
|
||||||
# define getgrouplist(_a, _b, _c, _d) sudo_getgrouplist((_a), (_b), (_c), (_d))
|
# define getgrouplist(_a, _b, _c, _d) sudo_getgrouplist((_a), (_b), (_c), (_d))
|
||||||
#endif /* GETGROUPLIST */
|
#endif /* GETGROUPLIST */
|
||||||
#ifndef HAVE_GETDELIM
|
#if !defined(HAVE_GETDELIM)
|
||||||
__dso_public ssize_t sudo_getdelim(char **bufp, size_t *bufsizep, int delim, FILE *fp);
|
__dso_public ssize_t sudo_getdelim(char **bufp, size_t *bufsizep, int delim, FILE *fp);
|
||||||
# undef getdelim
|
# undef getdelim
|
||||||
# define getdelim(_a, _b, _c, _d) sudo_getdelim((_a), (_b), (_c), (_d))
|
# define getdelim(_a, _b, _c, _d) sudo_getdelim((_a), (_b), (_c), (_d))
|
||||||
|
#elif defined(HAVE_DECL_GETDELIM) && !HAVE_DECL_GETDELIM
|
||||||
|
/* getdelim present in libc but missing prototype (old gcc fixed includes?) */
|
||||||
|
ssize_t getdelim(char **bufp, size_t *bufsizep, int delim, FILE *fp);
|
||||||
#endif /* HAVE_GETDELIM */
|
#endif /* HAVE_GETDELIM */
|
||||||
#ifndef HAVE_GETUSERSHELL
|
#ifndef HAVE_GETUSERSHELL
|
||||||
__dso_public char *sudo_getusershell(void);
|
__dso_public char *sudo_getusershell(void);
|
||||||
|
Reference in New Issue
Block a user