Fix handle casting in debug messages.
Change statvfs64 to statvfs and leave the build system configure it, so it doesn't break on OS X. Enable pkg-config on OS X.
This commit is contained in:
		@@ -53,7 +53,7 @@ void CmaClient::connectUsb()
 | 
			
		||||
{
 | 
			
		||||
    vita_device_t *vita;
 | 
			
		||||
 | 
			
		||||
    qDebug("Starting usb_thread: %u", (unsigned int)QThread::currentThreadId());
 | 
			
		||||
    qDebug("Starting usb_thread: %lu", (unsigned long)QThread::currentThreadId());
 | 
			
		||||
 | 
			
		||||
    setActive(true);
 | 
			
		||||
 | 
			
		||||
@@ -84,7 +84,7 @@ void CmaClient::connectWireless()
 | 
			
		||||
    QTime now = QTime::currentTime();
 | 
			
		||||
    qsrand(now.msec());
 | 
			
		||||
 | 
			
		||||
    qDebug("Starting wireless_thread: %u", (unsigned int)QThread::currentThreadId());
 | 
			
		||||
    qDebug("Starting wireless_thread: %lu", (unsigned long)QThread::currentThreadId());
 | 
			
		||||
 | 
			
		||||
    setActive(true);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -40,7 +40,7 @@ CmaEvent::CmaEvent(vita_device_t *s_device) :
 | 
			
		||||
 | 
			
		||||
void CmaEvent::process()
 | 
			
		||||
{
 | 
			
		||||
    qDebug("Starting event_thread: %u", (unsigned int)QThread::currentThreadId());
 | 
			
		||||
    qDebug("Starting event_thread: %lu", (unsigned long)QThread::currentThreadId());
 | 
			
		||||
    while(true) {
 | 
			
		||||
        sema.acquire();
 | 
			
		||||
        if(!isActive()) {
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								main.cpp
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								main.cpp
									
									
									
									
									
								
							@@ -76,7 +76,7 @@ int main(int argc, char *argv[])
 | 
			
		||||
        app.installTranslator(&translator);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    qDebug("Starting main thread: %u", (unsigned int)QThread::currentThreadId());
 | 
			
		||||
    qDebug("Starting main thread: %lu", (unsigned long)QThread::currentThreadId());
 | 
			
		||||
 | 
			
		||||
    // set the organization/application for QSettings to work properly
 | 
			
		||||
    app.setOrganizationName("qcma");
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1
									
								
								qcma.pro
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								qcma.pro
									
									
									
									
									
								
							@@ -101,3 +101,4 @@ unix {
 | 
			
		||||
 | 
			
		||||
win32:RC_FILE = qcma.rc
 | 
			
		||||
win32:QMAKE_CXXFLAGS += -mno-ms-bitfields
 | 
			
		||||
macx:QT_CONFIG -= no-pkg-config
 | 
			
		||||
 
 | 
			
		||||
@@ -40,9 +40,9 @@ bool getDiskSpace(const QString &dir, quint64 *free, quint64 *total)
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
#else
 | 
			
		||||
    struct statvfs64 stat;
 | 
			
		||||
    struct statvfs stat;
 | 
			
		||||
 | 
			
		||||
    if(statvfs64(dir.toUtf8().data(), &stat) == 0) {
 | 
			
		||||
    if(statvfs(dir.toUtf8().data(), &stat) == 0) {
 | 
			
		||||
        *total = stat.f_frsize * stat.f_blocks;
 | 
			
		||||
        *free = stat.f_frsize * stat.f_bfree;
 | 
			
		||||
        return true;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user