freebsd-ports/sysutils/radmind/files/patch-t2pkg.c
Thomas Zander 79c08ab7c5 - Update to new revision 2014052201
- Stagify
- Add LICENSE*
- Remove IGNORE_TIMESTAMPS option
- Handle file ownerships via pkg-plist macros
- Silence superfluous warnings
- Handle stripping of installed binaries
- Pet portlint

PR:		190120
Submitted by:	mikeg@bsd-box.net (maintainer)
Reviewed by:	riggs
Approved by:	mentors (implicit), maintainer (timeout)
2014-07-12 09:31:02 +00:00

46 lines
1.4 KiB
C

--- ./t2pkg.c.orig 2010-12-13 04:42:49.000000000 +0100
+++ ./t2pkg.c 2014-06-29 12:15:04.248542975 +0200
@@ -38,6 +38,7 @@
extern off_t lsize;
extern char *version;
+int tran_format = -1;
int cksum = 0;
int force = 0;
int case_sensitive = 1;
@@ -718,31 +719,23 @@
}
/* create the destination path */
- if ( snprintf( tmp, MAXPATHLEN, "%s/%s", dstdir, t->t_pinfo.pi_name )
+ if ( snprintf( dst, MAXPATHLEN, "%s/%s", dstdir, t->t_pinfo.pi_name )
>= MAXPATHLEN ) {
fprintf( stderr, "%s/%s: path too long\n", dstdir,
t->t_pinfo.pi_name );
exit( 2 );
}
- if ( mkdirs( tmp ) < 0 ) {
- fprintf( stderr, "mkdirs %s: %s\n", tmp, strerror( errno ));
- }
- if ( realpath( tmp, dst ) == NULL ) {
- fprintf( stderr, "realpath %s: %s\n", tmp, strerror( errno ));
- exit( 2 );
+ if ( mkdirs( dst ) < 0 ) {
+ fprintf( stderr, "mkdirs %s: %s\n", dst, strerror( errno ));
}
/* and the source path */
- if ( snprintf( tmp, MAXPATHLEN, "%s/%s", root, t->t_pinfo.pi_name )
+ if ( snprintf( src, MAXPATHLEN, "%s/%s", root, t->t_pinfo.pi_name )
>= MAXPATHLEN ) {
fprintf( stderr, "%s/%s: path too long\n", dstdir,
t->t_pinfo.pi_name );
exit( 2 );
}
- if ( realpath( tmp, src ) == NULL ) {
- fprintf( stderr, "realpath %s: %s\n", tmp, strerror( errno ));
- exit( 2 );
- }
if ( local_update( t, dst, src, where ) != 0 ) {
/* XXX is this really a good idea? */