From 143e346dd50a71a26ea697561e18aa9aa92f796d Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Mon, 12 Dec 2022 19:23:24 +0100 Subject: [PATCH] Assume strdup(3) exists MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It is required by POSIX.1-2001. Link: Cc: Christian Göttsche Cc: Iker Pedrosa Cc: Mike Frysinger Signed-off-by: Alejandro Colomar --- configure.ac | 1 - lib/defines.h | 6 ------ 2 files changed, 7 deletions(-) diff --git a/configure.ac b/configure.ac index c5bf4a64..f7f0119a 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 ed2d14de..748e18da 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