[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:

./Source/WebKit2/Platform/unix/SharedMemoryUnix.cpp

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);
#else
 fileDescriptor = shm_open(tempName.data(), O_CREAT | O_CLOEXEC | O_RDWR, S_IRUSR | S_IWUSR);
#endif



Other fixes required includes:

./Source/ThirdParty/gtest/include/gtest/internal/gtest-port.h

#include <unistd.c> is missing


./Source/WebKit2/UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp

#include <sys/wait.h> is missing


./Source/WebKit2/UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp

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>

./Tools/ImageDiff/gtk/ImageDiff.cpp

#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