mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-27 00:57:50 +00:00
o Fix build on FreeBSD 4.x branch
o Some code tidying up through better patching PR: 91485 Submitted by: Tod McQuillin <devin@spamcop.net>
This commit is contained in:
parent
263e59ef40
commit
eaf079bb20
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=153170
@ -47,11 +47,6 @@ post-patch:
|
||||
-e 's|-lgnugetopt||' \
|
||||
${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
|
||||
.endif
|
||||
|
||||
.if ${OSVERSION} < 500000
|
||||
@${REINPLACE_CMD} -e 's|#include <stdint.h>||' \
|
||||
${WRKSRC}/vobcopy.c
|
||||
.endif
|
||||
# fix typo
|
||||
@${REINPLACE_CMD} -E \
|
||||
-e 's|FreeBSD_Version|FreeBSD_version|' \
|
||||
|
@ -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 Wed Dec 7 21:31:56 2005
|
||||
+++ vobcopy.c Sun Jan 8 10:47:02 2006
|
||||
@@ -146,6 +146,8 @@
|
||||
#endif
|
||||
|
||||
@ -9,3 +9,29 @@
|
||||
|
||||
/*
|
||||
* the getopt part (getting the options from command line)
|
||||
@@ -1695,8 +1697,12 @@
|
||||
fprintf( stderr, "Used statvfs\n" );
|
||||
#endif
|
||||
temp1 = buf1.f_bavail;
|
||||
+#ifdef USE_STATFS
|
||||
+ temp2 = buf1.f_bsize;
|
||||
+#else
|
||||
/* On Solaris at least, f_bsize is not the actual block size -- lb */
|
||||
temp2 = buf1.f_frsize;
|
||||
+#endif
|
||||
sum = ( ( off_t )temp1 * ( off_t )temp2 );
|
||||
if( verbosity_level >= 1 )
|
||||
{
|
||||
@@ -1733,8 +1739,12 @@
|
||||
fprintf( stderr, "Used statvfs\n" );
|
||||
#endif
|
||||
temp1 = buf2.f_blocks;
|
||||
+#ifdef USE_STATFS
|
||||
+ temp2 = buf2.f_bsize;
|
||||
+#else
|
||||
/* On Solaris at least, f_bsize is not the actual block size -- lb */
|
||||
temp2 = buf2.f_frsize;
|
||||
+#endif
|
||||
sum = ( ( off_t )temp1 * ( off_t )temp2 );
|
||||
if( verbosity_level >= 1 )
|
||||
{
|
||||
|
@ -1,6 +1,23 @@
|
||||
--- 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 Wed Dec 7 21:32:10 2005
|
||||
+++ vobcopy.h Sun Jan 8 15:26:43 2006
|
||||
@@ -19,7 +19,6 @@
|
||||
|
||||
#if ( defined( __unix__ ) || defined( unix )) && !defined( USG )
|
||||
#include <sys/param.h>
|
||||
-#else
|
||||
#endif
|
||||
|
||||
#if defined( __GNUC__ ) && \
|
||||
@@ -32,6 +31,8 @@
|
||||
/* by some bugreport:*/
|
||||
#if !( defined( BSD ) && ( BSD >= 199306 ) ) && !defined( sun )
|
||||
#include <stdint.h>
|
||||
+#else
|
||||
+#include <inttypes.h>
|
||||
#endif
|
||||
|
||||
/*for/from play_title.c*/
|
||||
@@ -67,24 +68,23 @@
|
||||
/* ////////// *BSD ////////// */
|
||||
#if ( defined( BSD ) && ( BSD >= 199306 ) )
|
||||
|
||||
@ -9,11 +26,7 @@
|
||||
-#include <sys/mount.h>
|
||||
-#define USE_STATFS 1
|
||||
+# if ( defined( __NetBSD__) && ( __NetBSD_Version__ < 200040000 ) ) || \
|
||||
+ ( defined( __FreeBSD__) && \
|
||||
+ ( ((__FreeBSD_version >= 460102 ) && (__FreeBSD_version < 500000)) || \
|
||||
+ ( __FreeBSD_version >= 500040) \
|
||||
+ ) \
|
||||
+ )
|
||||
+ ( defined( __FreeBSD__) && ( __FreeBSD_version >= 500040 ) )
|
||||
+#include <sys/statvfs.h>
|
||||
|
||||
# else
|
||||
@ -25,19 +38,15 @@
|
||||
# endif
|
||||
|
||||
-# if defined(NetBSD)
|
||||
-
|
||||
-#include <sys/param.h>
|
||||
+# if defined(__NetBSD__) || defined(__FreeBSD__)
|
||||
|
||||
#include <sys/param.h>
|
||||
|
||||
#define USE_GETMNTINFO
|
||||
|
||||
-# if ( __NetBSD_Version__ < 200040000 )
|
||||
+# if (defined( __NetBSD__ ) && ( __NetBSD_Version__ < 200040000 )) || \
|
||||
+ ( defined( __FreeBSD__) && \
|
||||
+ ( ((__FreeBSD_version >= 460102 ) && (__FreeBSD_version < 500000)) || \
|
||||
+ ( __FreeBSD_version >= 500040) \
|
||||
+ ) \
|
||||
+ )
|
||||
+ (defined( __FreeBSD__ ))
|
||||
|
||||
#include <sys/mount.h>
|
||||
#define USE_STATFS_FOR_DEV
|
||||
|
Loading…
Reference in New Issue
Block a user