generic: make some stat calls 64-bit aware

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2016-04-21 20:23:12 +00:00
parent d147517cd5
commit bd00cedf46
4 changed files with 11 additions and 11 deletions

View file

@ -338,8 +338,8 @@ bool KTar::openArchive( QIODevice::OpenMode mode ) {
// We'll use the permission and user/group of d->rootDir
// for any directory we emulate (see findOrCreate)
//struct stat buf;
//stat( fileName(), &buf );
//KDE_struct_stat buf;
//KDE_stat( fileName(), &buf );
d->dirList.clear();
QIODevice* dev = device();

View file

@ -28,13 +28,13 @@
#include "kexiv2_p.h"
// C ANSI includes
extern "C"
{
#include <sys/stat.h>
#include <utime.h>
}
#include <kde_file.h>
namespace KExiv2Iface
{
@ -281,9 +281,9 @@ bool KExiv2::Private::saveOperations(const QFileInfo& finfo, Exiv2::Image::AutoP
if (!updateFileTimeStamp)
{
// Don't touch access and modification timestamp of file.
struct stat st;
KDE_struct_stat st;
struct utimbuf ut;
int ret = ::stat(QFile::encodeName(filePath), &st);
int ret = KDE_stat(QFile::encodeName(filePath), &st);
if (ret == 0)
{

View file

@ -451,8 +451,8 @@ void KPty::close()
// don't bother resetting unix98 pty, it will go away after closing master anyway.
if (memcmp(d->ttyName.data(), "/dev/pts/", 9)) {
if (!geteuid()) {
struct stat st;
if (!stat(d->ttyName.data(), &st)) {
KDE_struct_stat st;
if (!KDE_stat(d->ttyName.data(), &st)) {
chown(d->ttyName.data(), 0, st.st_gid == getgid() ? 0 : -1);
chmod(d->ttyName.data(), S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
}

View file

@ -21,8 +21,8 @@
#include "udevqt.h"
#include "udevqt_p.h"
#include <sys/stat.h>
#include <QtCore/QSocketNotifier>
#include <qplatformdefs.h>
namespace UdevQt {
@ -211,9 +211,9 @@ DeviceList Client::devicesBySubsystem(const QString &subsystem)
Device Client::deviceByDeviceFile(const QString &deviceFile)
{
struct stat sb;
QT_STATBUF sb;
if (stat(deviceFile.toLatin1().constData(), &sb) != 0)
if (QT_STAT(deviceFile.toLatin1().constData(), &sb) != 0)
return Device();
struct udev_device *ud = 0;