Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Jul 2012 12:59:19 GMT
From:      svn-freebsd-gecko@chruetertee.ch
To:        freebsd-gecko@freebsd.org
Subject:   [SVN-Commit] r830 - in branches/experimental: mail/thunderbird-esr/files mail/thunderbird/files www/firefox-esr/files www/firefox-nightly/files www/firefox/files www/libxul/files www/seamonkey/files
Message-ID:  <201207021259.q62CxJR6016695@trillian.chruetertee.ch>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Mon Jul  2 12:59:18 2012
New Revision: 830

Log:
prettify a few ipc patches

Modified:
   branches/experimental/mail/thunderbird-esr/files/patch-ipc-chromium-src-build-build_config.h
   branches/experimental/mail/thunderbird-esr/files/patch-mozilla-ipc-chromium-src-base-dir_reader_linux.h
   branches/experimental/mail/thunderbird/files/patch-ipc-chromium-src-build-build_config.h
   branches/experimental/mail/thunderbird/files/patch-mozilla-ipc-chromium-src-base-dir_reader_linux.h
   branches/experimental/www/firefox-esr/files/patch-ipc-chromium-src-base-dir_reader_linux.h
   branches/experimental/www/firefox-esr/files/patch-ipc-chromium-src-build-build_config.h
   branches/experimental/www/firefox-nightly/files/patch-ipc-chromium-src-base-dir_reader_linux.h
   branches/experimental/www/firefox-nightly/files/patch-ipc-chromium-src-build-build_config.h
   branches/experimental/www/firefox/files/patch-ipc-chromium-src-base-dir_reader_linux.h
   branches/experimental/www/firefox/files/patch-ipc-chromium-src-build-build_config.h
   branches/experimental/www/libxul/files/patch-ipc-chromium-src-base-dir_reader_linux.h
   branches/experimental/www/libxul/files/patch-ipc-chromium-src-build-build_config.h
   branches/experimental/www/seamonkey/files/patch-ipc-chromium-src-build-build_config.h
   branches/experimental/www/seamonkey/files/patch-mozilla-ipc-chromium-src-base-dir_reader_linux.h

Modified: branches/experimental/mail/thunderbird-esr/files/patch-ipc-chromium-src-build-build_config.h
==============================================================================
--- branches/experimental/mail/thunderbird-esr/files/patch-ipc-chromium-src-build-build_config.h	Sun Jul  1 22:57:45 2012	(r829)
+++ branches/experimental/mail/thunderbird-esr/files/patch-ipc-chromium-src-build-build_config.h	Mon Jul  2 12:59:18 2012	(r830)
@@ -5,7 +5,7 @@
  #if defined(__APPLE__)
  #define OS_MACOSX 1
 -#elif defined(__linux__) || defined(ANDROID)
-+#elif defined(__FreeBSD__) || defined(ANDROID)
++#elif defined(__linux__) || defined(ANDROID) || defined(__FreeBSD__)
  #define OS_LINUX 1
- #elif defined(_WIN32)
- #define OS_WIN 1
+ #elif defined(__OpenBSD__)
+ #define OS_OPENBSD 1

Modified: branches/experimental/mail/thunderbird-esr/files/patch-mozilla-ipc-chromium-src-base-dir_reader_linux.h
==============================================================================
--- branches/experimental/mail/thunderbird-esr/files/patch-mozilla-ipc-chromium-src-base-dir_reader_linux.h	Sun Jul  1 22:57:45 2012	(r829)
+++ branches/experimental/mail/thunderbird-esr/files/patch-mozilla-ipc-chromium-src-base-dir_reader_linux.h	Mon Jul  2 12:59:18 2012	(r830)
@@ -1,23 +1,27 @@
---- mozilla/ipc/chromium/src/base/dir_reader_linux.h.orig	2011-12-16 21:29:22.000000000 +0100
-+++ mozilla/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>
+--- mozilla/ipc/chromium/src/base/dir_reader_linux.h~
++++ mozilla/ipc/chromium/src/base/dir_reader_linux.h
+@@ -12,6 +12,10 @@
  #include <sys/syscall.h>
  #include <unistd.h>
  
-@@ -19,6 +20,8 @@
++#if defined(__FreeBSD__)
++#include <sys/dirent.h>
++#endif
++
+ #include "base/logging.h"
+ #include "base/eintr_wrapper.h"
+ 
+@@ -19,6 +23,9 @@
  
  namespace base {
  
++#if defined(__FreeBSD__)
 +#define linux_dirent struct dirent
-+#if 0
++#else
  struct linux_dirent {
    uint64_t        d_ino;
    int64_t         d_off;
-@@ -26,11 +29,16 @@
+@@ -26,11 +33,16 @@ struct linux_dirent {
    unsigned char   d_type;
    char            d_name[0];
  };
@@ -34,12 +38,15 @@
          offset_(0),
          size_(0) {
      memset(buf_, 0, sizeof(buf_));
-@@ -57,7 +65,7 @@
+@@ -57,7 +69,11 @@ class DirReaderLinux {
      if (offset_ != size_)
        return true;
  
--    const int r = syscall(__NR_getdents64, fd_, buf_, sizeof(buf_));
++#if !defined(__FreeBSD__)
+     const int r = syscall(__NR_getdents64, fd_, buf_, sizeof(buf_));
++#else
 +    const int r = syscall(SYS_getdents, fd_, buf_, sizeof(buf_));
++#endif
      if (r == 0)
        return false;
      if (r == -1) {

Modified: branches/experimental/mail/thunderbird/files/patch-ipc-chromium-src-build-build_config.h
==============================================================================
--- branches/experimental/mail/thunderbird/files/patch-ipc-chromium-src-build-build_config.h	Sun Jul  1 22:57:45 2012	(r829)
+++ branches/experimental/mail/thunderbird/files/patch-ipc-chromium-src-build-build_config.h	Mon Jul  2 12:59:18 2012	(r830)
@@ -5,7 +5,7 @@
  #if defined(__APPLE__)
  #define OS_MACOSX 1
 -#elif defined(__linux__) || defined(ANDROID)
-+#elif defined(__FreeBSD__) || defined(ANDROID)
++#elif defined(__linux__) || defined(ANDROID) || defined(__FreeBSD__)
  #define OS_LINUX 1
- #elif defined(_WIN32)
- #define OS_WIN 1
+ #elif defined(__OpenBSD__)
+ #define OS_OPENBSD 1

Modified: branches/experimental/mail/thunderbird/files/patch-mozilla-ipc-chromium-src-base-dir_reader_linux.h
==============================================================================
--- branches/experimental/mail/thunderbird/files/patch-mozilla-ipc-chromium-src-base-dir_reader_linux.h	Sun Jul  1 22:57:45 2012	(r829)
+++ branches/experimental/mail/thunderbird/files/patch-mozilla-ipc-chromium-src-base-dir_reader_linux.h	Mon Jul  2 12:59:18 2012	(r830)
@@ -1,23 +1,27 @@
---- mozilla/ipc/chromium/src/base/dir_reader_linux.h.orig	2011-12-16 21:29:22.000000000 +0100
-+++ mozilla/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>
+--- mozilla/ipc/chromium/src/base/dir_reader_linux.h~
++++ mozilla/ipc/chromium/src/base/dir_reader_linux.h
+@@ -12,6 +12,10 @@
  #include <sys/syscall.h>
  #include <unistd.h>
  
-@@ -19,6 +20,8 @@
++#if defined(__FreeBSD__)
++#include <sys/dirent.h>
++#endif
++
+ #include "base/logging.h"
+ #include "base/eintr_wrapper.h"
+ 
+@@ -19,6 +23,9 @@
  
  namespace base {
  
++#if defined(__FreeBSD__)
 +#define linux_dirent struct dirent
-+#if 0
++#else
  struct linux_dirent {
    uint64_t        d_ino;
    int64_t         d_off;
-@@ -26,11 +29,16 @@
+@@ -26,11 +33,16 @@ struct linux_dirent {
    unsigned char   d_type;
    char            d_name[0];
  };
@@ -34,12 +38,15 @@
          offset_(0),
          size_(0) {
      memset(buf_, 0, sizeof(buf_));
-@@ -57,7 +65,7 @@
+@@ -57,7 +69,11 @@ class DirReaderLinux {
      if (offset_ != size_)
        return true;
  
--    const int r = syscall(__NR_getdents64, fd_, buf_, sizeof(buf_));
++#if !defined(__FreeBSD__)
+     const int r = syscall(__NR_getdents64, fd_, buf_, sizeof(buf_));
++#else
 +    const int r = syscall(SYS_getdents, fd_, buf_, sizeof(buf_));
++#endif
      if (r == 0)
        return false;
      if (r == -1) {

Modified: branches/experimental/www/firefox-esr/files/patch-ipc-chromium-src-base-dir_reader_linux.h
==============================================================================
--- branches/experimental/www/firefox-esr/files/patch-ipc-chromium-src-base-dir_reader_linux.h	Sun Jul  1 22:57:45 2012	(r829)
+++ branches/experimental/www/firefox-esr/files/patch-ipc-chromium-src-base-dir_reader_linux.h	Mon Jul  2 12:59:18 2012	(r830)
@@ -1,23 +1,27 @@
---- 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>
+--- ipc/chromium/src/base/dir_reader_linux.h~
++++ ipc/chromium/src/base/dir_reader_linux.h
+@@ -12,6 +12,10 @@
  #include <sys/syscall.h>
  #include <unistd.h>
  
-@@ -19,6 +20,8 @@
++#if defined(__FreeBSD__)
++#include <sys/dirent.h>
++#endif
++
+ #include "base/logging.h"
+ #include "base/eintr_wrapper.h"
+ 
+@@ -19,6 +23,9 @@
  
  namespace base {
  
++#if defined(__FreeBSD__)
 +#define linux_dirent struct dirent
-+#if 0
++#else
  struct linux_dirent {
    uint64_t        d_ino;
    int64_t         d_off;
-@@ -26,11 +29,16 @@
+@@ -26,11 +33,16 @@ struct linux_dirent {
    unsigned char   d_type;
    char            d_name[0];
  };
@@ -34,12 +38,15 @@
          offset_(0),
          size_(0) {
      memset(buf_, 0, sizeof(buf_));
-@@ -57,7 +65,7 @@
+@@ -57,7 +69,11 @@ class DirReaderLinux {
      if (offset_ != size_)
        return true;
  
--    const int r = syscall(__NR_getdents64, fd_, buf_, sizeof(buf_));
++#if !defined(__FreeBSD__)
+     const int r = syscall(__NR_getdents64, fd_, buf_, sizeof(buf_));
++#else
 +    const int r = syscall(SYS_getdents, fd_, buf_, sizeof(buf_));
++#endif
      if (r == 0)
        return false;
      if (r == -1) {

Modified: branches/experimental/www/firefox-esr/files/patch-ipc-chromium-src-build-build_config.h
==============================================================================
--- branches/experimental/www/firefox-esr/files/patch-ipc-chromium-src-build-build_config.h	Sun Jul  1 22:57:45 2012	(r829)
+++ branches/experimental/www/firefox-esr/files/patch-ipc-chromium-src-build-build_config.h	Mon Jul  2 12:59:18 2012	(r830)
@@ -5,7 +5,7 @@
  #if defined(__APPLE__)
  #define OS_MACOSX 1
 -#elif defined(__linux__) || defined(ANDROID)
-+#elif defined(__FreeBSD__) || defined(ANDROID)
++#elif defined(__linux__) || defined(ANDROID) || defined(__FreeBSD__)
  #define OS_LINUX 1
- #elif defined(_WIN32)
- #define OS_WIN 1
+ #elif defined(__OpenBSD__)
+ #define OS_OPENBSD 1

Modified: branches/experimental/www/firefox-nightly/files/patch-ipc-chromium-src-base-dir_reader_linux.h
==============================================================================
--- branches/experimental/www/firefox-nightly/files/patch-ipc-chromium-src-base-dir_reader_linux.h	Sun Jul  1 22:57:45 2012	(r829)
+++ branches/experimental/www/firefox-nightly/files/patch-ipc-chromium-src-base-dir_reader_linux.h	Mon Jul  2 12:59:18 2012	(r830)
@@ -1,23 +1,27 @@
---- 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>
+--- ipc/chromium/src/base/dir_reader_linux.h~
++++ ipc/chromium/src/base/dir_reader_linux.h
+@@ -12,6 +12,10 @@
  #include <sys/syscall.h>
  #include <unistd.h>
  
-@@ -19,6 +20,8 @@
++#if defined(__FreeBSD__)
++#include <sys/dirent.h>
++#endif
++
+ #include "base/logging.h"
+ #include "base/eintr_wrapper.h"
+ 
+@@ -19,6 +23,9 @@
  
  namespace base {
  
++#if defined(__FreeBSD__)
 +#define linux_dirent struct dirent
-+#if 0
++#else
  struct linux_dirent {
    uint64_t        d_ino;
    int64_t         d_off;
-@@ -26,11 +29,16 @@
+@@ -26,11 +33,16 @@ struct linux_dirent {
    unsigned char   d_type;
    char            d_name[0];
  };
@@ -34,12 +38,15 @@
          offset_(0),
          size_(0) {
      memset(buf_, 0, sizeof(buf_));
-@@ -57,7 +65,7 @@
+@@ -57,7 +69,11 @@ class DirReaderLinux {
      if (offset_ != size_)
        return true;
  
--    const int r = syscall(__NR_getdents64, fd_, buf_, sizeof(buf_));
++#if !defined(__FreeBSD__)
+     const int r = syscall(__NR_getdents64, fd_, buf_, sizeof(buf_));
++#else
 +    const int r = syscall(SYS_getdents, fd_, buf_, sizeof(buf_));
++#endif
      if (r == 0)
        return false;
      if (r == -1) {

Modified: branches/experimental/www/firefox-nightly/files/patch-ipc-chromium-src-build-build_config.h
==============================================================================
--- branches/experimental/www/firefox-nightly/files/patch-ipc-chromium-src-build-build_config.h	Sun Jul  1 22:57:45 2012	(r829)
+++ branches/experimental/www/firefox-nightly/files/patch-ipc-chromium-src-build-build_config.h	Mon Jul  2 12:59:18 2012	(r830)
@@ -5,7 +5,7 @@
  #if defined(__APPLE__)
  #define OS_MACOSX 1
 -#elif defined(__linux__) || defined(ANDROID)
-+#elif defined(__FreeBSD__) || defined(ANDROID)
++#elif defined(__linux__) || defined(ANDROID) || defined(__FreeBSD__)
  #define OS_LINUX 1
- #elif defined(_WIN32)
- #define OS_WIN 1
+ #elif defined(__OpenBSD__)
+ #define OS_OPENBSD 1

Modified: branches/experimental/www/firefox/files/patch-ipc-chromium-src-base-dir_reader_linux.h
==============================================================================
--- branches/experimental/www/firefox/files/patch-ipc-chromium-src-base-dir_reader_linux.h	Sun Jul  1 22:57:45 2012	(r829)
+++ branches/experimental/www/firefox/files/patch-ipc-chromium-src-base-dir_reader_linux.h	Mon Jul  2 12:59:18 2012	(r830)
@@ -1,23 +1,27 @@
---- 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>
+--- ipc/chromium/src/base/dir_reader_linux.h~
++++ ipc/chromium/src/base/dir_reader_linux.h
+@@ -12,6 +12,10 @@
  #include <sys/syscall.h>
  #include <unistd.h>
  
-@@ -19,6 +20,8 @@
++#if defined(__FreeBSD__)
++#include <sys/dirent.h>
++#endif
++
+ #include "base/logging.h"
+ #include "base/eintr_wrapper.h"
+ 
+@@ -19,6 +23,9 @@
  
  namespace base {
  
++#if defined(__FreeBSD__)
 +#define linux_dirent struct dirent
-+#if 0
++#else
  struct linux_dirent {
    uint64_t        d_ino;
    int64_t         d_off;
-@@ -26,11 +29,16 @@
+@@ -26,11 +33,16 @@ struct linux_dirent {
    unsigned char   d_type;
    char            d_name[0];
  };
@@ -34,12 +38,15 @@
          offset_(0),
          size_(0) {
      memset(buf_, 0, sizeof(buf_));
-@@ -57,7 +65,7 @@
+@@ -57,7 +69,11 @@ class DirReaderLinux {
      if (offset_ != size_)
        return true;
  
--    const int r = syscall(__NR_getdents64, fd_, buf_, sizeof(buf_));
++#if !defined(__FreeBSD__)
+     const int r = syscall(__NR_getdents64, fd_, buf_, sizeof(buf_));
++#else
 +    const int r = syscall(SYS_getdents, fd_, buf_, sizeof(buf_));
++#endif
      if (r == 0)
        return false;
      if (r == -1) {

Modified: branches/experimental/www/firefox/files/patch-ipc-chromium-src-build-build_config.h
==============================================================================
--- branches/experimental/www/firefox/files/patch-ipc-chromium-src-build-build_config.h	Sun Jul  1 22:57:45 2012	(r829)
+++ branches/experimental/www/firefox/files/patch-ipc-chromium-src-build-build_config.h	Mon Jul  2 12:59:18 2012	(r830)
@@ -5,7 +5,7 @@
  #if defined(__APPLE__)
  #define OS_MACOSX 1
 -#elif defined(__linux__) || defined(ANDROID)
-+#elif defined(__FreeBSD__) || defined(ANDROID)
++#elif defined(__linux__) || defined(ANDROID) || defined(__FreeBSD__)
  #define OS_LINUX 1
- #elif defined(_WIN32)
- #define OS_WIN 1
+ #elif defined(__OpenBSD__)
+ #define OS_OPENBSD 1

Modified: branches/experimental/www/libxul/files/patch-ipc-chromium-src-base-dir_reader_linux.h
==============================================================================
--- branches/experimental/www/libxul/files/patch-ipc-chromium-src-base-dir_reader_linux.h	Sun Jul  1 22:57:45 2012	(r829)
+++ branches/experimental/www/libxul/files/patch-ipc-chromium-src-base-dir_reader_linux.h	Mon Jul  2 12:59:18 2012	(r830)
@@ -1,23 +1,27 @@
---- 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>
+--- ipc/chromium/src/base/dir_reader_linux.h~
++++ ipc/chromium/src/base/dir_reader_linux.h
+@@ -12,6 +12,10 @@
  #include <sys/syscall.h>
  #include <unistd.h>
  
-@@ -19,6 +20,8 @@
++#if defined(__FreeBSD__)
++#include <sys/dirent.h>
++#endif
++
+ #include "base/logging.h"
+ #include "base/eintr_wrapper.h"
+ 
+@@ -19,6 +23,9 @@
  
  namespace base {
  
++#if defined(__FreeBSD__)
 +#define linux_dirent struct dirent
-+#if 0
++#else
  struct linux_dirent {
    uint64_t        d_ino;
    int64_t         d_off;
-@@ -26,11 +29,16 @@
+@@ -26,11 +33,16 @@ struct linux_dirent {
    unsigned char   d_type;
    char            d_name[0];
  };
@@ -34,12 +38,15 @@
          offset_(0),
          size_(0) {
      memset(buf_, 0, sizeof(buf_));
-@@ -57,7 +65,7 @@
+@@ -57,7 +69,11 @@ class DirReaderLinux {
      if (offset_ != size_)
        return true;
  
--    const int r = syscall(__NR_getdents64, fd_, buf_, sizeof(buf_));
++#if !defined(__FreeBSD__)
+     const int r = syscall(__NR_getdents64, fd_, buf_, sizeof(buf_));
++#else
 +    const int r = syscall(SYS_getdents, fd_, buf_, sizeof(buf_));
++#endif
      if (r == 0)
        return false;
      if (r == -1) {

Modified: branches/experimental/www/libxul/files/patch-ipc-chromium-src-build-build_config.h
==============================================================================
--- branches/experimental/www/libxul/files/patch-ipc-chromium-src-build-build_config.h	Sun Jul  1 22:57:45 2012	(r829)
+++ branches/experimental/www/libxul/files/patch-ipc-chromium-src-build-build_config.h	Mon Jul  2 12:59:18 2012	(r830)
@@ -5,7 +5,7 @@
  #if defined(__APPLE__)
  #define OS_MACOSX 1
 -#elif defined(__linux__) || defined(ANDROID)
-+#elif defined(__FreeBSD__) || defined(ANDROID)
++#elif defined(__linux__) || defined(ANDROID) || defined(__FreeBSD__)
  #define OS_LINUX 1
- #elif defined(_WIN32)
- #define OS_WIN 1
+ #elif defined(__OpenBSD__)
+ #define OS_OPENBSD 1

Modified: branches/experimental/www/seamonkey/files/patch-ipc-chromium-src-build-build_config.h
==============================================================================
--- branches/experimental/www/seamonkey/files/patch-ipc-chromium-src-build-build_config.h	Sun Jul  1 22:57:45 2012	(r829)
+++ branches/experimental/www/seamonkey/files/patch-ipc-chromium-src-build-build_config.h	Mon Jul  2 12:59:18 2012	(r830)
@@ -5,7 +5,7 @@
  #if defined(__APPLE__)
  #define OS_MACOSX 1
 -#elif defined(__linux__) || defined(ANDROID)
-+#elif defined(__FreeBSD__) || defined(ANDROID)
++#elif defined(__linux__) || defined(ANDROID) || defined(__FreeBSD__)
  #define OS_LINUX 1
- #elif defined(_WIN32)
- #define OS_WIN 1
+ #elif defined(__OpenBSD__)
+ #define OS_OPENBSD 1

Modified: branches/experimental/www/seamonkey/files/patch-mozilla-ipc-chromium-src-base-dir_reader_linux.h
==============================================================================
--- branches/experimental/www/seamonkey/files/patch-mozilla-ipc-chromium-src-base-dir_reader_linux.h	Sun Jul  1 22:57:45 2012	(r829)
+++ branches/experimental/www/seamonkey/files/patch-mozilla-ipc-chromium-src-base-dir_reader_linux.h	Mon Jul  2 12:59:18 2012	(r830)
@@ -1,23 +1,27 @@
---- mozilla/ipc/chromium/src/base/dir_reader_linux.h.orig	2011-12-16 21:29:22.000000000 +0100
-+++ mozilla/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>
+--- mozilla/ipc/chromium/src/base/dir_reader_linux.h~
++++ mozilla/ipc/chromium/src/base/dir_reader_linux.h
+@@ -12,6 +12,10 @@
  #include <sys/syscall.h>
  #include <unistd.h>
  
-@@ -19,6 +20,8 @@
++#if defined(__FreeBSD__)
++#include <sys/dirent.h>
++#endif
++
+ #include "base/logging.h"
+ #include "base/eintr_wrapper.h"
+ 
+@@ -19,6 +23,9 @@
  
  namespace base {
  
++#if defined(__FreeBSD__)
 +#define linux_dirent struct dirent
-+#if 0
++#else
  struct linux_dirent {
    uint64_t        d_ino;
    int64_t         d_off;
-@@ -26,11 +29,16 @@
+@@ -26,11 +33,16 @@ struct linux_dirent {
    unsigned char   d_type;
    char            d_name[0];
  };
@@ -34,12 +38,15 @@
          offset_(0),
          size_(0) {
      memset(buf_, 0, sizeof(buf_));
-@@ -57,7 +65,7 @@
+@@ -57,7 +69,11 @@ class DirReaderLinux {
      if (offset_ != size_)
        return true;
  
--    const int r = syscall(__NR_getdents64, fd_, buf_, sizeof(buf_));
++#if !defined(__FreeBSD__)
+     const int r = syscall(__NR_getdents64, fd_, buf_, sizeof(buf_));
++#else
 +    const int r = syscall(SYS_getdents, fd_, buf_, sizeof(buf_));
++#endif
      if (r == 0)
        return false;
      if (r == -1) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207021259.q62CxJR6016695>