Bug 1399679 - Arrange some includes such that linux/posix_types.h is included before sys/select.h
The FD_SET/FD_CLR/FD_ZERO/FD_ISSET macros, when you look all the way
down, are defined depending on a _FDMASK or __FDMASK and a _NFDBITS or
__NFDBITS macro.
As described in sys/select.h, "Some versions of <linux/posix_types.h>
define these macros", and that's the case on CentOS 6. That's however
not the case on Debian wheezy.
sys/select.h has, following that comment, some #undef's to remove those
definitions, but when linux/posix_types.h is included afterwards, its
definitions take precedence.
Interestingly, while their effect is the same, the definitions are not
exactly the same between sys/select.h and linux/posix_types.h on CentOS
6, and depending on which is included first, codegen can be slightly
different.
So we arrange for the definitions in sys/select.h to be picked.
--- a/ipc/chromium/src/third_party/libevent/http.c
+++ b/ipc/chromium/src/third_party/libevent/http.c
@@ -23,35 +23,35 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "event2/event-config.h"
#include "evconfig-private.h"
+#ifdef EVENT__HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#endif
#ifdef EVENT__HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef EVENT__HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_IOCCOM_H
#include <sys/ioccom.h>
#endif
#ifdef EVENT__HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
#endif
#ifdef EVENT__HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
-#ifdef EVENT__HAVE_SYS_WAIT_H
-#include <sys/wait.h>
-#endif
#ifndef _WIN32
#include <sys/socket.h>
#include <sys/stat.h>
#else
#include <winsock2.h>
#include <ws2tcpip.h>
#endif
--- a/media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc
+++ b/media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc
@@ -3,16 +3,17 @@
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
+#include <linux/types.h>
#include "webrtc/modules/video_capture/linux/device_info_linux.h"
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <sys/stat.h>