Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 08 Jan 2006 08:20:29 +0900
From:      Tod McQuillin <devin@spamcop.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        lioux@FreeBSD.org
Subject:   ports/91485: [PATCH] sysutils/vobcopy: [Fix build on 4.x]
Message-ID:  <E1EvNML-0008vG-SM@mail.distalzou.net>
Resent-Message-ID: <200601072330.k07NU3oi019045@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         91485
>Category:       ports
>Synopsis:       [PATCH] sysutils/vobcopy: [Fix build on 4.x]
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jan 07 23:30:03 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Tod McQuillin
>Release:        FreeBSD 4.11-STABLE i386
>Organization:
>Environment:
System: FreeBSD plexi.pun-pun.prv 4.11-STABLE FreeBSD 4.11-STABLE #0: Thu Dec 15 19:04:55 JST 2005
>Description:
The changes to use statvfs instead of statfs were not complete.
This patch makes it continue to work on 4.x.

Port maintainer (lioux@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.63
>How-To-Repeat:
>Fix:

--- vobcopy-0.5.16.patch begins here ---
Index: files/patch-vobcopy.c
===================================================================
RCS file: /usr/src/cvs-repo/ports/sysutils/vobcopy/files/patch-vobcopy.c,v
retrieving revision 1.1
diff -u -u -r1.1 patch-vobcopy.c
--- files/patch-vobcopy.c	7 Jan 2006 02:23:03 -0000	1.1
+++ files/patch-vobcopy.c	7 Jan 2006 23:17:21 -0000
@@ -1,5 +1,5 @@
---- vobcopy.c.orig	Fri Jan  6 23:49:40 2006
-+++ vobcopy.c	Fri Jan  6 23:50:03 2006
+--- vobcopy.c.orig	Thu Dec  8 08:32:18 2005
++++ vobcopy.c	Sun Jan  8 08:16:54 2006
 @@ -146,6 +146,8 @@
  #endif
    
@@ -9,3 +9,63 @@
  
    /*
     * the getopt part (getting the options from command line)
+@@ -1438,7 +1440,7 @@
+           strcat( name, ".partial" );
+           
+ #if defined( HAS_LARGEFILE )
+-	  if( open( name, O_RDONLY|O_LARGEFILE ) >= 0 )
++	  if( open( name, O_RDONLY|0 ) >= 0 )
+ #else
+ 	    if( open( name, O_RDONLY ) >= 0 )
+ #endif
+@@ -1458,7 +1460,7 @@
+ 		    if( op == 'o' )
+ 		      {
+ #if defined( HAS_LARGEFILE )
+-			if( ( streamout = open( name, O_WRONLY | O_TRUNC | O_LARGEFILE ) ) < 0 )
++			if( ( streamout = open( name, O_WRONLY | O_TRUNC | 0 ) ) < 0 )
+ #else
+ 			  if( ( streamout = open( name, O_WRONLY | O_TRUNC ) ) < 0 )
+ #endif
+@@ -1471,7 +1473,7 @@
+ 		    else if( op == 'a' )
+ 		      {
+ #if defined( HAS_LARGEFILE )
+-			if( ( streamout = open( name, O_WRONLY | O_APPEND | O_LARGEFILE ) ) < 0 )
++			if( ( streamout = open( name, O_WRONLY | O_APPEND | 0 ) ) < 0 )
+ #else
+ 			  if( ( streamout = open( name, O_WRONLY | O_APPEND ) ) < 0 )
+ #endif
+@@ -1499,7 +1501,7 @@
+ 	      {
+ 		/*assign the stream */
+ #if defined( HAS_LARGEFILE )
+-		if( ( streamout = open( name, O_WRONLY | O_CREAT | O_LARGEFILE, 0644 ) ) < 0 )
++		if( ( streamout = open( name, O_WRONLY | O_CREAT | 0, 0644 ) ) < 0 )
+ #else
+ 		  if( ( streamout = open( name, O_WRONLY | O_CREAT, 0644 ) ) < 0 )
+ #endif
+@@ -1696,7 +1698,11 @@
+ #endif
+   temp1 = buf1.f_bavail;
+   /* On Solaris at least, f_bsize is not the actual block size -- lb */
++#ifdef USE_STATFS
++  temp2 = buf1.f_bsize;
++#else
+   temp2 = buf1.f_frsize;
++#endif
+   sum = ( ( off_t )temp1 * ( off_t )temp2 );
+   if( verbosity_level >= 1 )
+     {
+@@ -1734,7 +1740,11 @@
+ #endif
+   temp1 = buf2.f_blocks;
+   /* On Solaris at least, f_bsize is not the actual block size -- lb */
++#ifdef USE_STATFS
++  temp2 = buf2.f_bsize;
++#else
+   temp2 = buf2.f_frsize;
++#endif
+   sum = ( ( off_t )temp1 * ( off_t )temp2 );
+   if( verbosity_level >= 1 )
+     {
Index: files/patch-vobcopy.h
===================================================================
RCS file: /usr/src/cvs-repo/ports/sysutils/vobcopy/files/patch-vobcopy.h,v
retrieving revision 1.1
diff -u -u -r1.1 patch-vobcopy.h
--- files/patch-vobcopy.h	7 Jan 2006 02:23:03 -0000	1.1
+++ files/patch-vobcopy.h	7 Jan 2006 23:17:21 -0000
@@ -1,6 +1,6 @@
---- vobcopy.h.orig	Fri Jan  6 23:22:11 2006
-+++ vobcopy.h	Fri Jan  6 23:34:11 2006
-@@ -67,24 +67,33 @@
+--- vobcopy.h.orig	Thu Dec  8 08:32:32 2005
++++ vobcopy.h	Sun Jan  8 08:05:45 2006
+@@ -67,24 +67,31 @@
  /* //////////  *BSD //////////  */
  #if ( defined( BSD ) && ( BSD >= 199306 ) )
  
@@ -10,9 +10,7 @@
 -#define USE_STATFS 1
 +#  if ( defined( __NetBSD__) && ( __NetBSD_Version__ < 200040000 ) ) || \
 +      ( defined( __FreeBSD__) && \
-+	( ((__FreeBSD_version >= 460102 ) && (__FreeBSD_version < 500000)) || \
-+	  ( __FreeBSD_version >= 500040) \
-+	) \
++	( __FreeBSD_version >= 500040) \
 +      )
 +#include <sys/statvfs.h>
  
--- vobcopy-0.5.16.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1EvNML-0008vG-SM>