--- a/dom/system/OSFileConstants.cpp
+++ b/dom/system/OSFileConstants.cpp
@@ -9,22 +9,24 @@
#include "fcntl.h"
#include "errno.h"
#include "prsystem.h"
#if defined(XP_UNIX)
#include "unistd.h"
#include "dirent.h"
+#include "poll.h"
#include "sys/stat.h"
#if defined(ANDROID)
#include <sys/vfs.h>
#define statvfs statfs
#else
#include "sys/statvfs.h"
+#include "sys/wait.h"
#include <spawn.h>
#endif // defined(ANDROID)
#endif // defined(XP_UNIX)
#if defined(XP_LINUX)
#include <linux/fadvise.h>
#endif // defined(XP_LINUX)
@@ -399,16 +401,19 @@ void CleanupOSFileConstants()
* separate categories ("errors", "open", etc.),
* keep properties organized by alphabetical order
* and #ifdef-away properties that are not portable.
*/
static const dom::ConstantSpec gLibcProperties[] =
{
// Arguments for open
INT_CONSTANT(O_APPEND),
+#if defined(O_CLOEXEC)
+ INT_CONSTANT(O_CLOEXEC),
+#endif // defined(O_CLOEXEC)
INT_CONSTANT(O_CREAT),
#if defined(O_DIRECTORY)
INT_CONSTANT(O_DIRECTORY),
#endif // defined(O_DIRECTORY)
#if defined(O_EVTONLY)
INT_CONSTANT(O_EVTONLY),
#endif // defined(O_EVTONLY)
INT_CONSTANT(O_EXCL),
@@ -436,16 +441,20 @@ static const dom::ConstantSpec gLibcProp
INT_CONSTANT(O_SYMLINK),
#endif // defined(O_SYMLINK)
#if defined(O_SYNC)
INT_CONSTANT(O_SYNC),
#endif // defined(O_SYNC)
INT_CONSTANT(O_TRUNC),
INT_CONSTANT(O_WRONLY),
+#if defined(FD_CLOEXEC)
+ INT_CONSTANT(FD_CLOEXEC),
+#endif // defined(FD_CLOEXEC)
+
#if defined(AT_EACCESS)
INT_CONSTANT(AT_EACCESS),
#endif //defined(AT_EACCESS)
#if defined(AT_FDCWD)
INT_CONSTANT(AT_FDCWD),
#endif //defined(AT_FDCWD)
#if defined(AT_SYMLINK_NOFOLLOW)
INT_CONSTANT(AT_SYMLINK_NOFOLLOW),
@@ -477,23 +486,35 @@ static const dom::ConstantSpec gLibcProp
INT_CONSTANT(S_IXGRP),
INT_CONSTANT(S_IXUSR),
// seek
INT_CONSTANT(SEEK_CUR),
INT_CONSTANT(SEEK_END),
INT_CONSTANT(SEEK_SET),
- // fcntl command values
#if defined(XP_UNIX)
+ // poll
+ INT_CONSTANT(POLLERR),
+ INT_CONSTANT(POLLHUP),
+ INT_CONSTANT(POLLIN),
+ INT_CONSTANT(POLLNVAL),
+ INT_CONSTANT(POLLOUT),
+
+ // wait
+ INT_CONSTANT(WNOHANG),
+
+ // fcntl command values
INT_CONSTANT(F_GETLK),
+ INT_CONSTANT(F_SETFD),
+ INT_CONSTANT(F_SETFL),
INT_CONSTANT(F_SETLK),
INT_CONSTANT(F_SETLKW),
- // flock type values
+ // flock type values
INT_CONSTANT(F_RDLCK),
INT_CONSTANT(F_WRLCK),
INT_CONSTANT(F_UNLCK),
#endif // defined(XP_UNIX)
// copyfile
#if defined(COPYFILE_DATA)
INT_CONSTANT(COPYFILE_DATA),
INT_CONSTANT(COPYFILE_EXCL),