diff --git a/[refs] b/[refs] index 71612145b01f..9398c50dce4c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 184832c981fd38b1052f2dfa0262e793fa6c67d3 +refs/heads/master: b0fe551000179c868d46266278a890eab878baca diff --git a/trunk/scripts/kconfig/conf.c b/trunk/scripts/kconfig/conf.c index 3e1057f885c6..d190092c3b6e 100644 --- a/trunk/scripts/kconfig/conf.c +++ b/trunk/scripts/kconfig/conf.c @@ -11,6 +11,7 @@ #include #include #include +#include #define LKC_DIRECT_LINK #include "lkc.h" @@ -464,9 +465,22 @@ int main(int ac, char **av) input_mode = set_yes; break; case 'r': + { + struct timeval now; + unsigned int seed; + + /* + * Use microseconds derived seed, + * compensate for systems where it may be zero + */ + gettimeofday(&now, NULL); + + seed = (unsigned int)((now.tv_sec + 1) * (now.tv_usec + 1)); + srand(seed); + input_mode = set_random; - srand(time(NULL)); break; + } case 'h': printf(_("See README for usage info\n")); exit(0);