]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
Assume <errno.h> exists
authorAlejandro Colomar <alx@kernel.org>
Fri, 2 Dec 2022 15:58:12 +0000 (16:58 +0100)
committerIker Pedrosa <ikerpedrosam@gmail.com>
Mon, 12 Dec 2022 08:16:43 +0000 (09:16 +0100)
ISO C99 requires <errno.h>.

Many files in the project already include <errno.h> unconditionally,
so it's reasonable to assume that it is always available.

Link: <https://github.com/shadow-maint/shadow/pull/600>
Cc: Christian Göttsche <cgzones@googlemail.com>
Cc: Iker Pedrosa <ipedrosa@redhat.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
configure.ac
lib/defines.h

index c39da0f096926f46713c2e888bc311f6d515bb64..6dc5e9538cdaeef03940d943db30a19ecad7a52a 100644 (file)
@@ -36,7 +36,7 @@ LT_INIT
 dnl Checks for libraries.
 
 dnl Checks for header files.
-AC_CHECK_HEADERS(crypt.h errno.h fcntl.h limits.h unistd.h sys/time.h utmp.h \
+AC_CHECK_HEADERS(crypt.h fcntl.h limits.h unistd.h sys/time.h utmp.h \
        utmpx.h termios.h termio.h sgtty.h sys/ioctl.h syslog.h paths.h \
        utime.h ulimit.h sys/capability.h sys/random.h sys/resource.h \
        gshadow.h lastlog.h locale.h rpc/key_prot.h netdb.h acl/libacl.h \
index a47f257193d4b0b8b64bb9ef70e06dde5c55ddae..a849e5a72d4adcb5410db6bc4072e090222871c5 100644 (file)
@@ -48,9 +48,7 @@ extern char * textdomain (const char * domainname);
 #include <stdlib.h>
 #include <string.h>
 
-#if HAVE_ERRNO_H
-# include <errno.h>
-#endif
+#include <errno.h>
 
 #include <sys/stat.h>
 #include <sys/types.h>