mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.2.3566: build failure on old systems when using nano timestamp
Problem: Build failure on old systems when using nano timestamp. Solution: Define _BSD_SOURCE, _SVID_SOURCE and _DEFAULT_SOURCE. (Gary Johnson, closes #9054)
This commit is contained in:
parent
2446ec9b56
commit
44db603f69
@ -757,6 +757,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
3566,
|
||||||
/**/
|
/**/
|
||||||
3565,
|
3565,
|
||||||
/**/
|
/**/
|
||||||
|
15
src/vim.h
15
src/vim.h
@ -43,6 +43,21 @@
|
|||||||
// 700 is needed for mkdtemp().
|
// 700 is needed for mkdtemp().
|
||||||
# ifndef _XOPEN_SOURCE
|
# ifndef _XOPEN_SOURCE
|
||||||
# define _XOPEN_SOURCE 700
|
# define _XOPEN_SOURCE 700
|
||||||
|
|
||||||
|
// On old systems, defining _XOPEN_SOURCE causes _BSD_SOURCE, _SVID_SOURCE
|
||||||
|
// and/or // _DEFAULT_SOURCE not to be defined, so do that here. Those are
|
||||||
|
// needed to include nanosecond-resolution timestamps in struct stat. On new
|
||||||
|
// systems, _DEFAULT_SOURCE is needed to avoid warning messages about using
|
||||||
|
// deprecated _BSD_SOURCE or _SVID_SOURCE.
|
||||||
|
# ifndef _BSD_SOURCE
|
||||||
|
# define _BSD_SOURCE 1
|
||||||
|
# endif
|
||||||
|
# ifndef _SVID_SOURCE
|
||||||
|
# define _SVID_SOURCE 1
|
||||||
|
# endif
|
||||||
|
# ifndef _DEFAULT_SOURCE
|
||||||
|
# define _DEFAULT_SOURCE 1
|
||||||
|
# endif
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user