[webkit-gtk] FreeBSD Support for WebKit2

Bruno Lauzé brunolauze at msn.com
Thu Sep 19 15:39:49 PDT 2013

Apart from the patches already in place for FreeBSD port webkit-gtk3 2.0.3 in marcuscom.com svn repository,
this was the last hurdle to make webkit2 works in FreeBSD. Tested it a lot in FreeBSD 10-CURRENT

But i confirm with those changes here, still works in trunk.

In the file:


line 110:

 fileDescriptor = shm_open(tempName.data(), O_CREAT | O_CLOEXEC | O_RDWR, S_IRUSR | S_IWUSR);

Using shm_open with O_CLOEXEC is not compatible with FreeBSD.

We could fix it using :

#if defined(__FreeBSD__)
 fileDescriptor = shm_open(tempName.data(), O_CREAT | O_EXCL | O_RDWR, S_IRUSR | S_IWUSR);
 fileDescriptor = shm_open(tempName.data(), O_CREAT | O_CLOEXEC | O_RDWR, S_IRUSR | S_IWUSR);

Other fixes required includes:


#include <unistd.c> is missing


#include <sys/wait.h> is missing


line 7:
FreeBSD doesn't support SIGCLD / use SIGCLD -- since linux have SIGCHLD as a posix alias it could be SIGCHLD
Add an #if defined(SIGCLD) #else if #defined(SIGCHLD) around the call

line 18:
Add <sys/wait.h>


#include <stdlib.h> is missing


If someone could give FreeBSD some love, that would be great. Thanks. 		 	   		  

More information about the webkit-gtk mailing list