summaryrefslogtreecommitdiff
path: root/www/firefox-esr/files/patch-ipc-chromium-src-base-dir_reader_linux.h
diff options
context:
space:
mode:
authorBeat Gaetzi <beat@FreeBSD.org>2011-12-21 08:02:57 +0000
committerBeat Gaetzi <beat@FreeBSD.org>2011-12-21 08:02:57 +0000
commitd0020d8388b0d885672f14941f9a2d49f6ebffba (patch)
treebe3330f389c4f4d23ea4238c8292c555970ce8c5 /www/firefox-esr/files/patch-ipc-chromium-src-base-dir_reader_linux.h
parent- Document mozilla -- multiple vulnerabilities (diff)
- Update Firefox to 9.0
In collaboration with: cognet, flo, Jan Beich Approved by: portmgr (erwin, implicit) Security: http://www.vuxml.org/freebsd/e3ff776b-2ba6-11e1-93c6-0011856a6e37.html
Diffstat (limited to 'www/firefox-esr/files/patch-ipc-chromium-src-base-dir_reader_linux.h')
-rw-r--r--www/firefox-esr/files/patch-ipc-chromium-src-base-dir_reader_linux.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/www/firefox-esr/files/patch-ipc-chromium-src-base-dir_reader_linux.h b/www/firefox-esr/files/patch-ipc-chromium-src-base-dir_reader_linux.h
new file mode 100644
index 000000000000..36749ba8abc4
--- /dev/null
+++ b/www/firefox-esr/files/patch-ipc-chromium-src-base-dir_reader_linux.h
@@ -0,0 +1,45 @@
+--- ipc/chromium/src/base/dir_reader_linux.h.orig 2011-12-16 21:29:22.000000000 +0100
++++ ipc/chromium/src/base/dir_reader_linux.h 2011-12-19 21:00:27.000000000 +0100
+@@ -9,6 +9,7 @@
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <stdint.h>
++#include <sys/dirent.h>
+ #include <sys/syscall.h>
+ #include <unistd.h>
+
+@@ -19,6 +20,8 @@
+
+ namespace base {
+
++#define linux_dirent struct dirent
++#if 0
+ struct linux_dirent {
+ uint64_t d_ino;
+ int64_t d_off;
+@@ -26,11 +29,16 @@
+ unsigned char d_type;
+ char d_name[0];
+ };
++#endif
+
+ class DirReaderLinux {
+ public:
+ explicit DirReaderLinux(const char* directory_path)
++#ifdef O_DIRECTORY
+ : fd_(open(directory_path, O_RDONLY | O_DIRECTORY)),
++#else
++ : fd_(open(directory_path, O_RDONLY)),
++#endif
+ offset_(0),
+ size_(0) {
+ memset(buf_, 0, sizeof(buf_));
+@@ -57,7 +65,7 @@
+ if (offset_ != size_)
+ return true;
+
+- const int r = syscall(__NR_getdents64, fd_, buf_, sizeof(buf_));
++ const int r = syscall(SYS_getdents, fd_, buf_, sizeof(buf_));
+ if (r == 0)
+ return false;
+ if (r == -1) {