From a885b952fbfafc4b00f43e577110cc04c4b2ff9c Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Wed, 17 Jan 2018 09:52:15 -0700 Subject: [PATCH] Remove use of AC_HEADER_TIME, only obsolete platforms actually need this. Also stop removing sys/time.h unless the source file uses struct timeval. --- config.h.in | 3 -- configure | 35 ------------- configure.ac | 1 - lib/util/gettime.c | 6 +-- lib/util/mktemp.c | 6 +-- lib/util/nanosleep.c | 6 +-- lib/util/utimens.c | 6 +-- plugins/sudoers/boottime.c | 6 +-- plugins/sudoers/check.c | 7 +-- plugins/sudoers/getdate.c | 90 +++++++++++++++++----------------- plugins/sudoers/getdate.y | 5 +- plugins/sudoers/group_plugin.c | 7 +-- plugins/sudoers/iolog.c | 6 +-- plugins/sudoers/ldap.c | 6 +-- plugins/sudoers/sssd.c | 7 +-- plugins/sudoers/sudoreplay.c | 6 +-- plugins/sudoers/timestamp.c | 7 +-- plugins/sudoers/visudo.c | 7 +-- src/net_ifs.c | 3 +- src/sesh.c | 7 +-- src/sudo.c | 7 +-- src/sudo_edit.c | 7 +-- src/utmp.c | 6 +-- 23 files changed, 80 insertions(+), 167 deletions(-) diff --git a/config.h.in b/config.h.in index d97ba0a9f..2e4b877f6 100644 --- a/config.h.in +++ b/config.h.in @@ -1079,9 +1079,6 @@ /* Define to global, ppid or tty to set the default timestamp record type. */ #undef TIMESTAMP_TYPE -/* Define to 1 if you can safely include both and . */ -#undef TIME_WITH_SYS_TIME - /* The number of tries a user gets to enter their password. */ #undef TRIES_FOR_PASSWORD diff --git a/configure b/configure index fe28b90c7..3cd6b119f 100755 --- a/configure +++ b/configure @@ -17421,41 +17421,6 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 -$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -if ${ac_cv_header_time+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include - -int -main () -{ -if ((struct tm *) 0) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_time=yes -else - ac_cv_header_time=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 -$as_echo "$ac_cv_header_time" >&6; } -if test $ac_cv_header_time = yes; then - -$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h - -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } if ${ac_cv_header_stdbool_h+:} false; then : diff --git a/configure.ac b/configure.ac index 97d0959c0..def437a9b 100644 --- a/configure.ac +++ b/configure.ac @@ -2316,7 +2316,6 @@ dnl dnl Header file checks dnl AC_HEADER_DIRENT -AC_HEADER_TIME AC_HEADER_STDBOOL AC_HEADER_MAJOR AC_CHECK_HEADERS_ONCE([netgroup.h paths.h spawn.h utmpx.h wordexp.h sys/sockio.h sys/bsdtypes.h sys/select.h sys/stropts.h sys/sysmacros.h]) diff --git a/lib/util/gettime.c b/lib/util/gettime.c index 3d2cee8b8..054c7b695 100644 --- a/lib/util/gettime.c +++ b/lib/util/gettime.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015 Todd C. Miller + * Copyright (c) 2014-2018 Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -21,9 +21,7 @@ #include #include #include -#ifdef TIME_WITH_SYS_TIME -# include -#endif +#include #include #if defined(__MACH__) && !defined(HAVE_CLOCK_GETTIME) diff --git a/lib/util/mktemp.c b/lib/util/mktemp.c index 83530384a..defbd9014 100644 --- a/lib/util/mktemp.c +++ b/lib/util/mktemp.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2003, 2004, 2008-2011, 2013, 2015, 2017 + * Copyright (c) 2001, 2003, 2004, 2008-2011, 2013, 2015, 2017, 2018 * Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any @@ -38,9 +38,7 @@ #endif /* HAVE_STRINGS_H */ #include #include -#ifdef TIME_WITH_SYS_TIME -# include -#endif +#include #include "sudo_compat.h" #include "pathnames.h" diff --git a/lib/util/nanosleep.c b/lib/util/nanosleep.c index 70ca756f9..dba046c71 100644 --- a/lib/util/nanosleep.c +++ b/lib/util/nanosleep.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2011, 2013, 2017 Todd C. Miller + * Copyright (c) 2009-2011, 2013, 2017-2018 Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -23,9 +23,7 @@ #ifdef HAVE_SYS_SELECT_H #include #endif /* HAVE_SYS_SELECT_H */ -#if TIME_WITH_SYS_TIME -# include -#endif +#include #include #include "sudo_compat.h" diff --git a/lib/util/utimens.c b/lib/util/utimens.c index 1a53e0289..2be02b5e0 100644 --- a/lib/util/utimens.c +++ b/lib/util/utimens.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015 Todd C. Miller + * Copyright (c) 2015, 2018 Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -23,9 +23,7 @@ #include #include #include -#ifdef TIME_WITH_SYS_TIME -# include -#endif +#include #if !defined(HAVE_UTIMES) || defined(HAVE_FUTIME) # include #endif diff --git a/plugins/sudoers/boottime.c b/plugins/sudoers/boottime.c index c4031875b..a6cef04ff 100644 --- a/plugins/sudoers/boottime.c +++ b/plugins/sudoers/boottime.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2015 Todd C. Miller + * Copyright (c) 2009-2015, 2018 Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -34,9 +34,7 @@ #endif /* HAVE_STRINGS_H */ #include #include -#ifdef TIME_WITH_SYS_TIME -# include -#endif +#include #ifndef __linux__ # if defined(HAVE_SYSCTL) && defined(KERN_BOOTTIME) # include diff --git a/plugins/sudoers/check.c b/plugins/sudoers/check.c index 8a68d4d04..ed49d63ae 100644 --- a/plugins/sudoers/check.c +++ b/plugins/sudoers/check.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1993-1996,1998-2005, 2007-2016 + * Copyright (c) 1993-1996,1998-2005, 2007-2018 * Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any @@ -22,7 +22,6 @@ #include #include -#include #include #include #ifdef HAVE_STRING_H @@ -32,9 +31,7 @@ # include #endif /* HAVE_STRINGS_H */ #include -#ifdef TIME_WITH_SYS_TIME -# include -#endif +#include #include #include #include diff --git a/plugins/sudoers/getdate.c b/plugins/sudoers/getdate.c index 526156a40..11f55105a 100644 --- a/plugins/sudoers/getdate.c +++ b/plugins/sudoers/getdate.c @@ -27,7 +27,6 @@ #include #include -#include #include #include #ifdef HAVE_STRING_H @@ -41,9 +40,7 @@ #elif defined(HAVE_INTTYPES_H) # include #endif -#ifdef TIME_WITH_SYS_TIME -# include -#endif +#include #include #include @@ -110,7 +107,7 @@ static int yyerror(const char *s); static int yylex(void); int yyparse(void); -#line 103 "getdate.y" +#line 100 "getdate.y" #ifndef YYSTYPE_DEFINED #define YYSTYPE_DEFINED typedef union { @@ -118,7 +115,7 @@ typedef union { enum _MERIDIAN Meridian; } YYSTYPE; #endif /* YYSTYPE_DEFINED */ -#line 121 "getdate.c" +#line 118 "getdate.c" #define tAGO 257 #define tDAY 258 #define tDAYZONE 259 @@ -386,7 +383,8 @@ short *yyss; short *yysslim; YYSTYPE *yyvs; unsigned int yystacksize; -#line 322 "getdate.y" +int yyparse(void); +#line 319 "getdate.y" /* Month and day table. */ static TABLE const MonthDayTable[] = { @@ -1008,7 +1006,7 @@ main(int argc, char *argv[]) /* NOTREACHED */ } #endif /* TEST */ -#line 959 "getdate.c" +#line 957 "getdate.c" /* allocate initial stack or double stack size, up to YYMAXDEPTH */ #if defined(__cplusplus) || defined(__STDC__) static int yygrowstack(void) @@ -1217,37 +1215,37 @@ yyreduce: switch (yyn) { case 3: -#line 121 "getdate.y" +#line 118 "getdate.y" { yyHaveTime++; } break; case 4: -#line 124 "getdate.y" +#line 121 "getdate.y" { yyHaveZone++; } break; case 5: -#line 127 "getdate.y" +#line 124 "getdate.y" { yyHaveDate++; } break; case 6: -#line 130 "getdate.y" +#line 127 "getdate.y" { yyHaveDay++; } break; case 7: -#line 133 "getdate.y" +#line 130 "getdate.y" { yyHaveRel++; } break; case 9: -#line 139 "getdate.y" +#line 136 "getdate.y" { yyHour = yyvsp[-1].Number; yyMinutes = 0; @@ -1256,7 +1254,7 @@ case 9: } break; case 10: -#line 145 "getdate.y" +#line 142 "getdate.y" { yyHour = yyvsp[-3].Number; yyMinutes = yyvsp[-1].Number; @@ -1265,7 +1263,7 @@ case 10: } break; case 11: -#line 151 "getdate.y" +#line 148 "getdate.y" { yyHour = yyvsp[-3].Number; yyMinutes = yyvsp[-1].Number; @@ -1275,7 +1273,7 @@ case 11: } break; case 12: -#line 158 "getdate.y" +#line 155 "getdate.y" { yyHour = yyvsp[-5].Number; yyMinutes = yyvsp[-3].Number; @@ -1284,7 +1282,7 @@ case 12: } break; case 13: -#line 164 "getdate.y" +#line 161 "getdate.y" { yyHour = yyvsp[-5].Number; yyMinutes = yyvsp[-3].Number; @@ -1295,56 +1293,56 @@ case 13: } break; case 14: -#line 174 "getdate.y" +#line 171 "getdate.y" { yyTimezone = yyvsp[0].Number; yyDSTmode = DSToff; } break; case 15: -#line 178 "getdate.y" +#line 175 "getdate.y" { yyTimezone = yyvsp[0].Number; yyDSTmode = DSTon; } break; case 16: -#line 183 "getdate.y" +#line 180 "getdate.y" { yyTimezone = yyvsp[-1].Number; yyDSTmode = DSTon; } break; case 17: -#line 189 "getdate.y" +#line 186 "getdate.y" { yyDayOrdinal = 1; yyDayNumber = yyvsp[0].Number; } break; case 18: -#line 193 "getdate.y" +#line 190 "getdate.y" { yyDayOrdinal = 1; yyDayNumber = yyvsp[-1].Number; } break; case 19: -#line 197 "getdate.y" +#line 194 "getdate.y" { yyDayOrdinal = yyvsp[-1].Number; yyDayNumber = yyvsp[0].Number; } break; case 20: -#line 203 "getdate.y" +#line 200 "getdate.y" { yyMonth = yyvsp[-2].Number; yyDay = yyvsp[0].Number; } break; case 21: -#line 207 "getdate.y" +#line 204 "getdate.y" { if (yyvsp[-4].Number >= 100) { yyYear = yyvsp[-4].Number; @@ -1358,7 +1356,7 @@ case 21: } break; case 22: -#line 218 "getdate.y" +#line 215 "getdate.y" { /* ISO 8601 format. yyyy-mm-dd. */ yyYear = yyvsp[-2].Number; @@ -1367,7 +1365,7 @@ case 22: } break; case 23: -#line 224 "getdate.y" +#line 221 "getdate.y" { /* e.g. 17-JUN-1992. */ yyDay = yyvsp[-2].Number; @@ -1376,14 +1374,14 @@ case 23: } break; case 24: -#line 230 "getdate.y" +#line 227 "getdate.y" { yyMonth = yyvsp[-1].Number; yyDay = yyvsp[0].Number; } break; case 25: -#line 234 "getdate.y" +#line 231 "getdate.y" { yyMonth = yyvsp[-3].Number; yyDay = yyvsp[-2].Number; @@ -1391,14 +1389,14 @@ case 25: } break; case 26: -#line 239 "getdate.y" +#line 236 "getdate.y" { yyMonth = yyvsp[0].Number; yyDay = yyvsp[-1].Number; } break; case 27: -#line 243 "getdate.y" +#line 240 "getdate.y" { yyMonth = yyvsp[-1].Number; yyDay = yyvsp[-2].Number; @@ -1406,68 +1404,68 @@ case 27: } break; case 28: -#line 250 "getdate.y" +#line 247 "getdate.y" { yyRelSeconds = -yyRelSeconds; yyRelMonth = -yyRelMonth; } break; case 30: -#line 257 "getdate.y" +#line 254 "getdate.y" { yyRelSeconds += yyvsp[-1].Number * yyvsp[0].Number * 60L; } break; case 31: -#line 260 "getdate.y" +#line 257 "getdate.y" { yyRelSeconds += yyvsp[-1].Number * yyvsp[0].Number * 60L; } break; case 32: -#line 263 "getdate.y" +#line 260 "getdate.y" { yyRelSeconds += yyvsp[0].Number * 60L; } break; case 33: -#line 266 "getdate.y" +#line 263 "getdate.y" { yyRelSeconds += yyvsp[-1].Number; } break; case 34: -#line 269 "getdate.y" +#line 266 "getdate.y" { yyRelSeconds += yyvsp[-1].Number; } break; case 35: -#line 272 "getdate.y" +#line 269 "getdate.y" { yyRelSeconds++; } break; case 36: -#line 275 "getdate.y" +#line 272 "getdate.y" { yyRelMonth += yyvsp[-1].Number * yyvsp[0].Number; } break; case 37: -#line 278 "getdate.y" +#line 275 "getdate.y" { yyRelMonth += yyvsp[-1].Number * yyvsp[0].Number; } break; case 38: -#line 281 "getdate.y" +#line 278 "getdate.y" { yyRelMonth += yyvsp[0].Number; } break; case 39: -#line 286 "getdate.y" +#line 283 "getdate.y" { if (yyHaveTime && yyHaveDate && !yyHaveRel) yyYear = yyvsp[0].Number; @@ -1495,18 +1493,18 @@ case 39: } break; case 40: -#line 313 "getdate.y" +#line 310 "getdate.y" { yyval.Meridian = MER24; } break; case 41: -#line 316 "getdate.y" +#line 313 "getdate.y" { yyval.Meridian = yyvsp[0].Meridian; } break; -#line 1457 "getdate.c" +#line 1455 "getdate.c" } yyssp -= yym; yystate = *yyssp; diff --git a/plugins/sudoers/getdate.y b/plugins/sudoers/getdate.y index a213ba0b0..e23ef8d0c 100644 --- a/plugins/sudoers/getdate.y +++ b/plugins/sudoers/getdate.y @@ -15,7 +15,6 @@ #include #include -#include #include #include #ifdef HAVE_STRING_H @@ -29,9 +28,7 @@ #elif defined(HAVE_INTTYPES_H) # include #endif -#ifdef TIME_WITH_SYS_TIME -# include -#endif +#include #include #include diff --git a/plugins/sudoers/group_plugin.c b/plugins/sudoers/group_plugin.c index b3fc5bb5f..ec753c81b 100644 --- a/plugins/sudoers/group_plugin.c +++ b/plugins/sudoers/group_plugin.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2015 Todd C. Miller + * Copyright (c) 2010-2018 Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -18,7 +18,6 @@ #include #include -#include #include #include #ifdef HAVE_STRING_H @@ -28,9 +27,7 @@ # include #endif /* HAVE_STRINGS_H */ #include -#ifdef TIME_WITH_SYS_TIME -# include -#endif +#include #include #include #include diff --git a/plugins/sudoers/iolog.c b/plugins/sudoers/iolog.c index 192407031..251469790 100644 --- a/plugins/sudoers/iolog.c +++ b/plugins/sudoers/iolog.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2017 Todd C. Miller + * Copyright (c) 2009-2018 Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -28,9 +28,7 @@ # include #endif /* HAVE_STRINGS_H */ #include -#ifdef TIME_WITH_SYS_TIME -# include -#endif +#include #include #include #include diff --git a/plugins/sudoers/ldap.c b/plugins/sudoers/ldap.c index 104816b8e..c3cb3fe53 100644 --- a/plugins/sudoers/ldap.c +++ b/plugins/sudoers/ldap.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003-2017 Todd C. Miller + * Copyright (c) 2003-2018 Todd C. Miller * * This code is derived from software contributed by Aaron Spangler. * @@ -31,9 +31,7 @@ # include #endif /* HAVE_STRINGS_H */ #include -#ifdef TIME_WITH_SYS_TIME -# include -#endif +#include #include #include #include diff --git a/plugins/sudoers/sssd.c b/plugins/sudoers/sssd.c index afb2d2f74..398f9a758 100644 --- a/plugins/sudoers/sssd.c +++ b/plugins/sudoers/sssd.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003-2016 Todd C. Miller + * Copyright (c) 2003-2018 Todd C. Miller * Copyright (c) 2011 Daniel Kopecek * * This code is derived from software contributed by Aaron Spangler. @@ -22,7 +22,6 @@ #ifdef HAVE_SSSD #include -#include #include #include #include @@ -33,9 +32,7 @@ # include #endif /* HAVE_STRINGS_H */ #include -#ifdef TIME_WITH_SYS_TIME -# include -#endif +#include #include #include #include diff --git a/plugins/sudoers/sudoreplay.c b/plugins/sudoers/sudoreplay.c index 2a16e9475..3034b8ac9 100644 --- a/plugins/sudoers/sudoreplay.c +++ b/plugins/sudoers/sudoreplay.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2017 Todd C. Miller + * Copyright (c) 2009-2018 Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -36,9 +36,7 @@ # include #endif /* HAVE_STRINGS_H */ #include -#ifdef TIME_WITH_SYS_TIME -# include -#endif +#include #include #include #include diff --git a/plugins/sudoers/timestamp.c b/plugins/sudoers/timestamp.c index 8a6f8e4e2..d4e65c96e 100644 --- a/plugins/sudoers/timestamp.c +++ b/plugins/sudoers/timestamp.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2017 Todd C. Miller + * Copyright (c) 2014-2018 Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -17,7 +17,6 @@ #include #include -#include #include #include #include @@ -34,9 +33,7 @@ # include #endif /* HAVE_STRINGS_H */ #include -#ifdef TIME_WITH_SYS_TIME -# include -#endif +#include #include #include #include diff --git a/plugins/sudoers/visudo.c b/plugins/sudoers/visudo.c index 33143ea97..4d788faf3 100644 --- a/plugins/sudoers/visudo.c +++ b/plugins/sudoers/visudo.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 1998-2005, 2007-2017 + * Copyright (c) 1996, 1998-2005, 2007-2018 * Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any @@ -32,7 +32,6 @@ #include #include #include -#include #include #ifndef __TANDEM # include @@ -54,11 +53,9 @@ #include #include #include +#include #include #include -#ifdef TIME_WITH_SYS_TIME -# include -#endif #include "sudoers.h" #include "interfaces.h" diff --git a/src/net_ifs.c b/src/net_ifs.c index a1a2905ad..dc8f3ce30 100644 --- a/src/net_ifs.c +++ b/src/net_ifs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 1998-2005, 2007-2015 + * Copyright (c) 1996, 1998-2005, 2007-2015, 2018 * Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any @@ -32,7 +32,6 @@ struct rtentry; #include #include -#include #include #if defined(HAVE_SYS_SOCKIO_H) && !defined(SIOCGIFCONF) # include diff --git a/src/sesh.c b/src/sesh.c index 29d6e920f..c994fea4a 100644 --- a/src/sesh.c +++ b/src/sesh.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2010-2016 Todd C. Miller + * Copyright (c) 2008, 2010-2018 Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -20,7 +20,6 @@ #include #include -#include #include #include #include @@ -28,15 +27,13 @@ #include #include #include +#include #include #ifdef HAVE_STDBOOL_H # include #else # include "compat/stdbool.h" #endif /* HAVE_STDBOOL_H */ -#ifdef TIME_WITH_SYS_TIME -# include -#endif #include "sudo_gettext.h" /* must be included before sudo_compat.h */ diff --git a/src/sudo.c b/src/sudo.c index daa129c83..b205b8a52 100644 --- a/src/sudo.c +++ b/src/sudo.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2017 Todd C. Miller + * Copyright (c) 2009-2018 Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -24,7 +24,6 @@ #include #include #include -#include #include #include #include @@ -42,9 +41,7 @@ #include #include #include -#ifdef TIME_WITH_SYS_TIME -# include -#endif +#include #ifdef HAVE_SELINUX # include /* for is_selinux_enabled() */ #endif diff --git a/src/sudo_edit.c b/src/sudo_edit.c index 5698443a4..7c7219940 100644 --- a/src/sudo_edit.c +++ b/src/sudo_edit.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2004-2008, 2010-2017 Todd C. Miller + * Copyright (c) 2004-2008, 2010-2018 Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -18,7 +18,6 @@ #include #include -#include #include #include #include @@ -29,6 +28,7 @@ #ifdef HAVE_STRINGS_H # include #endif /* HAVE_STRINGS_H */ +#include #include #include #include @@ -37,9 +37,6 @@ #include #include #include -#ifdef TIME_WITH_SYS_TIME -# include -#endif #include "sudo.h" #include "sudo_exec.h" diff --git a/src/utmp.c b/src/utmp.c index 052c8614a..cc8dec8a8 100644 --- a/src/utmp.c +++ b/src/utmp.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2016 Todd C. Miller + * Copyright (c) 2011-2018 Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -28,9 +28,7 @@ # include #endif /* HAVE_STRINGS_H */ #include -#ifdef TIME_WITH_SYS_TIME -# include -#endif +#include #ifdef HAVE_UTMPX_H # include #else -- 2.40.0