Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 611780 Details for
Bug 708350
<sys-apps/busybox-1.31.1-r1 fails to compile with sys-devel/glibc-2.31
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for glibc-2.31
glibc-2.31.patch (text/plain), 1.84 KB, created by
Mike Lothian
on 2020-02-05 14:20:49 UTC
(
hide
)
Description:
Patch for glibc-2.31
Filename:
MIME Type:
Creator:
Mike Lothian
Created:
2020-02-05 14:20:49 UTC
Size:
1.84 KB
patch
obsolete
>diff --git a/coreutils/date.c b/coreutils/date.c >index 3414d38ae..4ade6abb4 100644 >--- a/coreutils/date.c >+++ b/coreutils/date.c >@@ -279,6 +279,9 @@ int date_main(int argc UNUSED_PARAM, char **argv) > time(&ts.tv_sec); > #endif > } >+#if !ENABLE_FEATURE_DATE_NANO >+ ts.tv_nsec = 0; >+#endif > localtime_r(&ts.tv_sec, &tm_time); > > /* If date string is given, update tm_time, and maybe set date */ >@@ -301,9 +304,10 @@ int date_main(int argc UNUSED_PARAM, char **argv) > if (date_str[0] != '@') > tm_time.tm_isdst = -1; > ts.tv_sec = validate_tm_time(date_str, &tm_time); >+ ts.tv_nsec = 0; > > /* if setting time, set it */ >- if ((opt & OPT_SET) && stime(&ts.tv_sec) < 0) { >+ if ((opt & OPT_SET) && clock_settime(CLOCK_REALTIME, &ts) < 0) { > bb_perror_msg("can't set date"); > } > } >diff --git a/libbb/missing_syscalls.c b/libbb/missing_syscalls.c >index 87cf59b3d..dc40d9155 100644 >--- a/libbb/missing_syscalls.c >+++ b/libbb/missing_syscalls.c >@@ -15,14 +15,6 @@ pid_t getsid(pid_t pid) > return syscall(__NR_getsid, pid); > } > >-int stime(const time_t *t) >-{ >- struct timeval tv; >- tv.tv_sec = *t; >- tv.tv_usec = 0; >- return settimeofday(&tv, NULL); >-} >- > int sethostname(const char *name, size_t len) > { > return syscall(__NR_sethostname, name, len); >diff --git a/util-linux/rdate.c b/util-linux/rdate.c >index 70f829e7f..878375d78 100644 >--- a/util-linux/rdate.c >+++ b/util-linux/rdate.c >@@ -95,9 +95,13 @@ int rdate_main(int argc UNUSED_PARAM, char **argv) > if (!(flags & 2)) { /* no -p (-s may be present) */ > if (time(NULL) == remote_time) > bb_error_msg("current time matches remote time"); >- else >- if (stime(&remote_time) < 0) >+ else { >+ struct timespec ts; >+ ts.tv_sec = remote_time; >+ ts.tv_nsec = 0; >+ if (clock_settime(CLOCK_REALTIME, &ts) < 0) > bb_perror_msg_and_die("can't set time of day"); >+ } > } > > if (flags != 1) /* not lone -s */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 708350
:
611778
| 611780