pkgsrc/games/crafty/patches/patch-ac
dholland f3344d894c Fix some 64-bit issues and a y2038 bug I noticed in passing.
Also, round size of shmget() requests to be page-aligned; at least on
amd64 -current this seems to be required to run at all.
PKGREVISION++.
2008-08-17 21:00:20 +00:00

26 lines
912 B
Text

$NetBSD: patch-ac,v 1.6 2008/08/17 21:00:20 dholland Exp $
--- option.c~ 2008-04-15 18:41:49.000000000 -0400
+++ option.c 2008-08-17 16:23:39.000000000 -0400
@@ -3025,7 +3025,7 @@ int Option(TREE * RESTRICT tree)
output_file = stdout;
secs = time(0);
- timestruct = localtime((time_t *) & secs);
+ timestruct = localtime(& secs);
if (nargs > 1) {
if (!(output_file = fopen(args[1], "w"))) {
printf("unable to open %s for write.\n", args[1]);
@@ -3548,10 +3548,10 @@ int Option(TREE * RESTRICT tree)
*/
else if (OptionMatch("tags", *args)) {
struct tm *timestruct;
- long secs;
+ time_t secs;
secs = time(0);
- timestruct = localtime((time_t *) & secs);
+ timestruct = localtime(& secs);
printf("[Event \"%s\"]\n", pgn_event);
printf("[Site \"%s\"]\n", pgn_site);
printf("[Date \"%4d.%02d.%02d\"]\n", timestruct->tm_year + 1900,