qtsixa does not compile with g++-4.7 and newer unless includes to unistd.h are added to various files. Patch included.

Bug #1275306 reported by Dylan Morrison
This bug report is a duplicate of:  Bug #1036744: Does not compile in Debian SID. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QtSixA
New
Undecided
Unassigned

Bug Description

This is the result of trying to compile qtsixa 1.5.1 (the latest obtainable from SourceForge) on a g++-4.7 system:

[...]
g++ -O2 -Wall -Wl,-Bsymbolic-functions sixad-bin.cpp bluetooth.cpp shared.cpp textfile.cpp -o bins/sixad-bin `pkg-config --cflags --libs bluez` -lpthread -fpermissive
sixad-bin.cpp: In function ‘int main(int, char**)’:
sixad-bin.cpp:89:18: error: ‘close’ was not declared in this scope
         close(ctl);
                  ^
sixad-bin.cpp:100:20: error: ‘sleep’ was not declared in this scope
             sleep(2);
[...]

And a number of repeat errors of the sort with read, execve, usleep, etc.
From a quick google I was able to find that these require unistd.h to be included, which was not included in any of the files that needed it, which were entirely contained in the "sixad" directory of the source.

I added it to all the files that need it, and have included a patch.

As per the guidelines:
Distro: Debian GNU/Linux jessie (testing)
QT version: 4.8.5+git209-g718fae5+dfsg-1
PyQT version: 4.10.3+dfsg1-1
QtSixA log:

Qt version: 4.8.6
PyQt version: 4.10.3
QtSixA version: 1.5.1
Will use 'sudo' for root actions

Revision history for this message
Dylan Morrison (insidious) wrote :
summary: - qtsixad does not compile with g++-4.7 and newer unless includes to
+ qtsixa does not compile with g++-4.7 and newer unless includes to
unistd.h are added to various files. Patch included.
description: updated
Revision history for this message
Dylan Morrison (insidious) wrote :

Found an older bug that's the same issue. Summary was a bit nonspecific, so I missed it, sorry.

Revision history for this message
Justin Rowe (jusrowe23) wrote :

Just a quick question, I'm really new to this and I'm not sure how to add the patch?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.