diff options
author | 2011-12-08 06:23:58 +0000 | |
---|---|---|
committer | 2011-12-08 06:23:58 +0000 | |
commit | e6a372f946a56d35c53a0429319b14bc1ff1bd12 (patch) | |
tree | a807f5d9cf6893c16d02444116a60fc0915fe2fc /sys-process/procps/files | |
parent | Add patch from upstream for x32 support. (diff) | |
download | historical-e6a372f946a56d35c53a0429319b14bc1ff1bd12.tar.gz historical-e6a372f946a56d35c53a0429319b14bc1ff1bd12.tar.bz2 historical-e6a372f946a56d35c53a0429319b14bc1ff1bd12.zip |
Fix ps segfault on x32 ABI.
Package-Manager: portage-2.2.0_alpha79/cvs/Linux x86_64
Diffstat (limited to 'sys-process/procps/files')
-rw-r--r-- | sys-process/procps/files/procps-3.2.8-time_t.patch | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sys-process/procps/files/procps-3.2.8-time_t.patch b/sys-process/procps/files/procps-3.2.8-time_t.patch new file mode 100644 index 000000000000..8053cda924c8 --- /dev/null +++ b/sys-process/procps/files/procps-3.2.8-time_t.patch @@ -0,0 +1,15 @@ +seconds_since_1970 is unsigned long, so we can't pass it as time_t or +we corrupt memory if sizeof(time_t) > sizeof(unsigned long) + +--- ps/output.c ++++ ps/output.c +@@ -989,7 +989,8 @@ + const char *fmt; + int tm_year; + int tm_yday; +- our_time = localtime(&seconds_since_1970); /* not reentrant */ ++ time_t sec_1970 = seconds_since_1970; ++ our_time = localtime(&sec_1970); /* not reentrant */ + tm_year = our_time->tm_year; + tm_yday = our_time->tm_yday; + t = getbtime() + pp->start_time / Hertz; |