[core] attempt to quiet compiler warning in LEDE

personal/stbuehler/mod-csrf
Glenn Strauss 2017-09-05 20:16:26 -04:00
parent dadfb5fcf5
commit 26dce93086
1 changed files with 2 additions and 1 deletions

View File

@ -113,7 +113,8 @@ static int li_rand_device_bytes (unsigned char *buf, int num)
ssize_t rd = 0;
#ifdef RNDGETENTCNT
int entropy;
if (0 == ioctl(fd, RNDGETENTCNT, &entropy) && entropy >= num*8)
if (0 == ioctl(fd, (unsigned long)(RNDGETENTCNT), &entropy)
&& entropy >= num*8)
#endif
rd = read(fd, buf, (size_t)num);
close(fd);