[Interest] Issues building Qt 5.4.0 and 5.3.2 on CentOS 5.

Thiago Macieira thiago.macieira at intel.com
Sat Feb 14 03:52:16 CET 2015


On Friday 13 February 2015 15:04:56 Simon Matthews wrote:
> However, I have now come across another missing definition: O_CLOEXEC.

Another case of a kernel too old. O_CLOEXEC was introduced in 2.6.23 (2007).

However, I thought I had all cases protected by #ifdef.

> On later platforms, this is defined in glibc-headers and linux-headers.
> Specifically, the files:
> /usr/include/asm-generic/fcntl.h and /usr/include/asm-generic/fcntl.h
> The definition is used in
> qtwebkit/Source/WebKit2/Platform/unix/SharedMemoryUnix.cpp:
>        do {
>              fileDescriptor = shm_open(tempName.data(), O_CREAT | O_CLOEXEC
> | O_RDWR, S_IRUSR | S_IWUSR); } while (fileDescriptor == -1 && errno ==
> EINTR);

Ah, WebKit, so not my code.

> 
> Can I safely comment change the line to the following:
> fileDescriptor = shm_open(tempName.data(), O_CREAT |  O_RDWR, S_IRUSR |
> S_IWUSR);

Yes, but then shm_open will not be thread-safe. Your kernel is too old anyway 
to be thread-safe, so there's nothing you can do.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Interest mailing list