From: Alejandro Colomar Date: Mon, 12 Dec 2022 18:23:24 +0000 (+0100) Subject: Assume strdup(3) exists X-Git-Tag: 4.14.0-rc1~267 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=143e346dd50a71a26ea697561e18aa9aa92f796d;p=thirdparty%2Fshadow.git Assume strdup(3) exists It is required by POSIX.1-2001. Link: Cc: Christian Göttsche Cc: Iker Pedrosa Cc: Mike Frysinger Signed-off-by: Alejandro Colomar --- diff --git a/configure.ac b/configure.ac index c5bf4a64e..f7f0119a2 100644 --- a/configure.ac +++ b/configure.ac @@ -102,7 +102,6 @@ AC_TYPE_GETGROUPS AC_FUNC_UTIME_NULL AC_REPLACE_FUNCS(putgrent putpwent putspent) AC_REPLACE_FUNCS(sgetgrent sgetpwent sgetspent) -AC_REPLACE_FUNCS(strdup) AC_CHECK_FUNC(setpgrp) AC_CHECK_FUNC(secure_getenv, [AC_DEFINE(HAS_SECURE_GETENV, diff --git a/lib/defines.h b/lib/defines.h index ed2d14de3..748e18da0 100644 --- a/lib/defines.h +++ b/lib/defines.h @@ -232,12 +232,6 @@ static inline void memzero(void *ptr, size_t size) #endif #endif -#ifdef sun /* hacks for compiling on SunOS */ -# ifndef SOLARIS -extern char *strdup (); -# endif -#endif - /* * string to use for the pw_passwd field in /etc/passwd when using * shadow passwords - most systems use "x" but there are a few