NetBSD Problem Report #35928
From dauphin@enst.fr Mon Mar 5 18:17:41 2007
Return-Path: <dauphin@enst.fr>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id 55B5863B896
for <gnats-bugs@gnats.netbsd.org>; Mon, 5 Mar 2007 18:17:41 +0000 (UTC)
Message-Id: <1173118655.24898@bi.enst.fr>
Date: Mon, 5 Mar 2007 19:17:35 +0100
To: "gnats bugs" <gnats-bugs@NetBSD.org>
Subject: blender modern solaris 64bit gcc
X-Send-Pr-Version: gtk-send-pr 0.4.5
X-GNATS-Notify:
>Number: 35928
>Category: pkg
>Synopsis: blender modern solaris 64bit gcc
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: solaris-pkg-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Mar 05 18:20:00 +0000 2007
>Closed-Date: Mon May 23 05:21:33 +0000 2022
>Last-Modified: Mon May 23 05:25:01 +0000 2022
>Originator: Gilles Dauphin
>Release: SunOS 5.10 i86pc
>Organization:
ENST
>Environment:
System: SunOS bi.enst.fr 5.10 Generic_118855-19 i86pc
>Description:
blender crash when saving file or opening one
problem is in source/blender/blenlib/intern/storage.c
statfs() is not available on 64bit ABI. its an obsolete feature.
use statvfs instead
>How-To-Repeat:
run blender on solaris
>Fix:
--- patch-ab begins here ---
--- source/blender/blenlib/intern/storage.c.orig Wed Jul 27 22:16:37 2005
+++ source/blender/blenlib/intern/storage.c Mon Mar 5 18:57:10 2007
@@ -50,7 +50,11 @@
#include <time.h>
#include <sys/stat.h>
-#if !defined(linux) && (defined(__sgi) || defined(__sun__) || defined(__sun) || defined(__sparc) || defined(__sparc__))
+#if defined(__DragonFly__) || defined(__sun__) || defined(__sun)
+#include <sys/statvfs.h>
+#endif
+
+#if !defined(linux) && defined(__sgi)
#include <sys/statfs.h>
#endif
@@ -89,10 +93,6 @@
#include <pwd.h>
#endif
-#if !defined(__FreeBSD__) && !defined(__APPLE__)
-#include <malloc.h>
-#endif
-
/* lib includes */
#include "MEM_guardedalloc.h"
@@ -177,7 +177,11 @@
return (double) (freec*bytesps*sectorspc);
#else
+#if defined(__DragonFly__) || defined(__sun__) || defined(__sun) || (defined (__NetBSD__) && __NetBSD_Version__ >= 299000900) /* 2.99.9 */
+ struct statvfs disk;
+#else
struct statfs disk;
+#endif
char name[100],*slash;
@@ -188,16 +192,19 @@
if (slash) slash[1] = 0;
} else strcpy(name,"/");
-#if defined (__FreeBSD__) || defined (linux) || defined (__OpenBSD__) || defined (__APPLE__)
+#if defined(__DragonFly__) || defined(__sun__) || defined(__sun) || (defined (__NetBSD__) && __NetBSD_Version__ >= 299000900) /* 2.99.9 */
+ if (statvfs(name, &disk)) return(-1);
+#elif defined (__FreeBSD__) || defined (linux) || defined (__OpenBSD__) || \
+ defined (__APPLE__) || defined (__NetBSD__)
if (statfs(name, &disk)) return(-1);
#endif
#ifdef __BeOS
return -1;
#endif
-#if !defined(linux) && (defined (__sgi) || defined (__sun__) || defined (__sun) || defined(__sparc) || defined(__sparc__))
+#if !defined(linux) && defined (__sgi)
if (statfs(name, &disk, sizeof(struct statfs), 0)){
- /* printf("diskfree: Couldn't get information about %s.\n",dir); */
+ printf("diskfree: Couldn't get information about %s.\n",dir);
return(-1);
}
#endif
--- patch-ab ends here ---
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->solaris-pkg-people
Responsible-Changed-By: wiz@netbsd.org
Responsible-Changed-When: Tue, 06 Mar 2007 00:03:17 +0000
Responsible-Changed-Why:
Solaris pkgsrc problem.
State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Mon, 23 May 2022 05:21:33 +0000
State-Changed-Why:
fixed, thanks
(patch is much tidier in modern blender, but still needed)
From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/35928 CVS commit: pkgsrc/graphics/blender
Date: Mon, 23 May 2022 05:21:25 +0000
Module Name: pkgsrc
Committed By: dholland
Date: Mon May 23 05:21:25 UTC 2022
Modified Files:
pkgsrc/graphics/blender: distinfo
Added Files:
pkgsrc/graphics/blender/patches:
patch-source_blender_blenlib_intern_storage.c
Log Message:
graphics/blender: use statvfs on solaris
From Gilles Dauphin in PR 35928.
To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 pkgsrc/graphics/blender/distinfo
cvs rdiff -u -r0 -r1.1 \
pkgsrc/graphics/blender/patches/patch-source_blender_blenlib_intern_storage.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: gnats-precook-prs,v 1.4 2018/12/21 14:20:20 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.