Skip to content

Commit 2635e83

Browse files
64-bitmanchrisbra
authored andcommitted
patch 9.1.1706: MS-Windows: Compile error when building with if_ruby
Problem: MS-Windows: Compile error when building with if_ruby (Christian Robinson, after v9.1.1704) Solution: Do not define gettimeofday() if ruby interface is compiled in (Foxe Chen). fixes: #18143 closes: #18144 Signed-off-by: Foxe Chen <chen.foxe@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
1 parent 6931730 commit 2635e83

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

src/proto/time.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ void f_timer_pause(typval_T *argvars, typval_T *rettv);
2020
void f_timer_start(typval_T *argvars, typval_T *rettv);
2121
void f_timer_stop(typval_T *argvars, typval_T *rettv);
2222
void f_timer_stopall(typval_T *argvars, typval_T *rettv);
23-
#if defined(MSWIN) || defined(__MINGW32__)
23+
#if (defined(MSWIN) || defined(__MINGW32__)) && !defined(FEAT_RUBY)
2424
int gettimeofday(struct timeval *tv, char *dummy);
2525
#endif
2626
void time_push(void *tv_rel, void *tv_start);

src/time.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ get_ctime(time_t thetime, int add_newline)
127127
return buf;
128128
}
129129

130-
#if defined(MSWIN) || defined(__MINGW32__)
130+
// Ruby has its own version of gettimeofday
131+
#if (defined(MSWIN) || defined(__MINGW32__)) && !defined(FEAT_RUBY)
131132
/*
132133
* Windows doesn't have gettimeofday(), although it does have struct timeval.
133134
*/

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -724,6 +724,8 @@ static char *(features[]) =
724724

725725
static int included_patches[] =
726726
{ /* Add new patch number below this line */
727+
/**/
728+
1706,
727729
/**/
728730
1705,
729731
/**/

0 commit comments

Comments
 (0)