1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 01:03:01 +00:00

#598: fix openbsd alignment & #include issues reported by naddy

This commit is contained in:
Charles Kerr 2008-01-07 19:17:43 +00:00
parent ed0f77ad61
commit 6db7a5177f
2 changed files with 4 additions and 3 deletions

View file

@ -430,15 +430,15 @@ parseProgress( tr_torrent * tor,
/* compare file mtimes */
tr_time_t * curMTimes = getMTimes( tor, &n );
const uint8_t * walk = buf;
const tr_time_t * oldMTimes = (const tr_time_t *) walk;
tr_time_t mtime;
for( i=0; i<n; ++i ) {
if ( curMTimes[i] == oldMTimes[i] )
readBytes( &mtime, &walk, sizeof(tr_time_t) );
if ( curMTimes[i] == mtime )
tr_torrentSetFileChecked( tor, i, TRUE );
else
tr_dbg( "File '%s' recheck needed", tor->info.files[i].name );
}
free( curMTimes );
walk += n * sizeof(tr_time_t);
/* get the completion bitfield */
memset( &bitfield, 0, sizeof bitfield );

View file

@ -16,6 +16,7 @@
#include <inttypes.h>
#include <string.h> /* strerror */
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>