fix const-correctness of argument to stime
it's unclear what the historical signature for this function was, but semantically, the argument should be a pointer to const, and this is what glibc uses. correct programs should not be using this function anyway, so it's unlikely to matter.
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
int stime(time_t *t)
|
||||
int stime(const time_t *t)
|
||||
{
|
||||
struct timeval tv = { .tv_sec = *t, .tv_usec = 0 };
|
||||
return settimeofday(&tv, (void *)0);
|
||||
|
||||
Reference in New Issue
Block a user