Fix the MS-DOS build

* msdos/sedlibmk.inp (OMIT_GNULIB_MODULE_boot-time): Define to
true.
* src/filelock.c (get_boot_sec) [MSDOS]: Return 0; this
information is probably unavailable.  It is also irrelevant as
MS-DOS is a single-process operating system.
This commit is contained in:
Po Lu 2023-08-13 11:10:50 +08:00
parent b7c194c1ea
commit 5e0c200608
2 changed files with 13 additions and 5 deletions

View file

@ -489,6 +489,7 @@ OMIT_GNULIB_MODULE_strtoll = true\
OMIT_GNULIB_MODULE_symlink = true\
OMIT_GNULIB_MODULE_sys_select = true\
OMIT_GNULIB_MODULE_sys_time = true\
OMIT_GNULIB_MODULE_boot-time = true\
OMIT_GNULIB_MODULE_crypto\/md5 = true
/^arg-nonnull\.h:/,/^[ ][ ]*mv /c\
arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h\

View file

@ -107,7 +107,8 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
hard nor symbolic links. */
/* Return the time of the last system boot. */
/* Return the time of the last system boot, or 0 if that information
is unavailable. */
static time_t
get_boot_sec (void)
@ -117,10 +118,16 @@ get_boot_sec (void)
if (will_dump_p ())
return 0;
struct timespec boot_time;
boot_time.tv_sec = 0;
get_boot_time (&boot_time);
return boot_time.tv_sec;
#ifndef MSDOS
{
struct timespec boot_time;
boot_time.tv_sec = 0;
get_boot_time (&boot_time);
return boot_time.tv_sec;
}
#else /* MSDOS */
return 0;
#endif /* MSDOS */
}
/* An arbitrary limit on lock contents length. 8 K should be plenty