diff options
author | Todd C. Miller <Todd.Miller@sudo.ws> | 2022-04-19 13:28:39 -0600 |
---|---|---|
committer | Todd C. Miller <Todd.Miller@sudo.ws> | 2022-04-19 13:28:39 -0600 |
commit | dee5ae6919d6427d3a4ddf1f51791872451dd592 (patch) | |
tree | b10cb3998ab5edab5a60a6779db40770add10947 /configure.ac | |
parent | 09f72ce2cb03ebb1ffafe570a8c8928694ce67fb (diff) | |
download | sudo-dee5ae6919d6427d3a4ddf1f51791872451dd592.tar.gz |
Define _TIME_BITS=64 on systems that define __TIMESIZE, like GNU libc.
This should be replaced by a specialized autoconf macro when one
becomes available.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 268cdb033..fabcd0853 100644 --- a/configure.ac +++ b/configure.ac @@ -2447,9 +2447,20 @@ AC_CHECK_HEADERS([procfs.h] [sys/procfs.h], [AC_CHECK_MEMBERS(struct psinfo.pr_t ])] break) # -# Check for large file support. +# Check for large file and 64-bit time support. +# GNU libc only allows setting _TIME_BITS when FILE_OFFSET_BITS is also set. +# GNU libc defines __TIMESIZE on systems where _TIME_BITS can be set. # AC_SYS_LARGEFILE +if test X"$ac_cv_sys_file_offset_bits" = X"yes"; then + AC_CHECK_DECL(__TIMESIZE, [ + AC_DEFINE([_TIME_BITS], [64], [Number of bits in a time_t, on hosts where this is settable.]) + ], [], [ +AC_INCLUDES_DEFAULT +#include <time.h> + ]) +fi + # # HP-UX may need to define _XOPEN_SOURCE_EXTENDED to expose MSG_WAITALL. # Also, HP-UX 11.23 has a broken sys/types.h when large files support |