Skip to content

Commit

Permalink
64-bit time_t fixes for NetBSD-current. PKGREVISION++. ok agc
Browse files Browse the repository at this point in the history
  • Loading branch information
dholland committed Jan 9, 2010
1 parent 24469a8 commit 897b0fa
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 9 deletions.
4 changes: 2 additions & 2 deletions archivers/lha/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# $NetBSD: Makefile,v 1.36 2009/05/19 08:59:00 wiz Exp $
# $NetBSD: Makefile,v 1.37 2010/01/09 19:10:46 dholland Exp $

DISTNAME= lha-114i
PKGNAME= lha-114.9
PKGREVISION= 3
PKGREVISION= 4
CATEGORIES= archivers
MASTER_SITES= http://www2m.biglobe.ne.jp/~dolphin/lha/prog/

Expand Down
5 changes: 3 additions & 2 deletions archivers/lha/distinfo
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
$NetBSD: distinfo,v 1.9 2006/12/03 03:09:46 obache Exp $
$NetBSD: distinfo,v 1.10 2010/01/09 19:10:46 dholland Exp $

SHA1 (lha-114i.tar.gz) = 79e35271f2cf783f946db3f22e304fef72dbac99
RMD160 (lha-114i.tar.gz) = c561e0758b467a61f45d287582effc53df29f01d
Size (lha-114i.tar.gz) = 64608 bytes
SHA1 (patch-aa) = 945856fde42c3e98bb2b00f8633babc2daf0437c
SHA1 (patch-ab) = 4b5cce4fd83a5a65cb152183d23f430da1e5aa21
SHA1 (patch-ad) = a3169c55c462d4eb54e52709744ef7084a94bcb4
SHA1 (patch-ac) = e7bf4b9b500bca2ccbe376fd560870b29c8c6af9
SHA1 (patch-ad) = 62ac7c0637d981de6571b838d545fcb872851e05
SHA1 (patch-ae) = a53647ccf72511ecd2b5306e23da1219fa5e7264
SHA1 (patch-af) = 0c2f6d5bf23c3c98b102487abe3dd1190470f50c
SHA1 (patch-ag) = 9ad3bc807a3cda4f71d8fbbbea19306f252f2489
Expand Down
14 changes: 14 additions & 0 deletions archivers/lha/patches/patch-ac
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
$NetBSD: patch-ac,v 1.3 2010/01/09 19:10:46 dholland Exp $

time_t compat fixes for NetBSD-6+

--- src/lha.h.orig 2009-02-13 18:28:46.000000000 -0500
+++ src/lha.h 2009-02-13 18:28:10.000000000 -0500
@@ -16,6 +16,7 @@
#include <sys/types.h>
#include <sys/file.h>
#include <sys/stat.h>
+#include <sys/time.h>

#include <signal.h>

34 changes: 29 additions & 5 deletions archivers/lha/patches/patch-ad
Original file line number Diff line number Diff line change
@@ -1,8 +1,32 @@
$NetBSD: patch-ad,v 1.3 2004/05/13 11:42:43 taca Exp $
$NetBSD: patch-ad,v 1.4 2010/01/09 19:10:46 dholland Exp $

--- src/lhext.c.orig 2000-10-04 23:57:38.000000000 +0900
+++ src/lhext.c
@@ -190,8 +190,13 @@ extract_one(afp, hdr)
1. security fix
2. utimes() fixes for netbsd-6 time_t

upstream: (1) unknown (2) not reported, docs in .jp only, wakarimasen :(

--- src/lhext.c.orig 2000-10-04 10:57:38.000000000 -0400
+++ src/lhext.c 2009-02-13 18:42:35.000000000 -0500
@@ -143,13 +143,15 @@ adjust_info(name, hdr)
char *name;
LzHeader *hdr;
{
- time_t utimebuf[2];
+ struct timeval utimebuf[2];

/* adjust file stamp */
- utimebuf[0] = utimebuf[1] = hdr->unix_last_modified_stamp;
+ utimebuf[0].tv_sec = hdr->unix_last_modified_stamp;
+ utimebuf[0].tv_usec = 0;
+ utimebuf[1] = utimebuf[0];

if ((hdr->unix_mode & UNIX_FILE_TYPEMASK) != UNIX_FILE_SYMLINK)
- utime(name, utimebuf);
+ utimes(name, utimebuf);

if (hdr->extend_type == EXTEND_UNIX
|| hdr->extend_type == EXTEND_OS68K
@@ -190,8 +192,13 @@ extract_one(afp, hdr)
q = (char *) rindex(hdr->name, '/') + 1;
}
else {
Expand All @@ -17,7 +41,7 @@ $NetBSD: patch-ad,v 1.3 2004/05/13 11:42:43 taca Exp $
/*
* if OSK then strip device name
*/
@@ -419,6 +424,33 @@ cmd_extract()
@@ -419,6 +426,33 @@ cmd_extract()
return;
}

Expand Down

0 comments on commit 897b0fa

Please sign in to comment.