Commit 2b6e7b2f authored by Ben Smith's avatar Ben Smith

[NaCl SDK] Fix sys/time.h and utime.h headers

include_next must be outside the include guard!

When naclports builds a package, it copies the headers from
$NACL_SDK_ROOT/include/$toolchain directly into the toolchain include
directories (i.e. toolchain/linux_x86_newlib/x86_64-nacl/usr/include).

This means that the same header is included twice in the header seach path,
e.g.:
$NACL_SDK_ROOT/include/newlib/foo.h
$NACL_SDK_ROOT/toolchain/linux_x86_newlib/x86_64-nacl/usr/include/foo.h

If include_next is inside the include guard, then the full include chain for
that header name will not be followed (it will stop when it hits the same
include guard).

BUG=none
R=bradnelson@google.com, sbc@chromium.org, bradnelson@chromium.org

Review URL: https://codereview.chromium.org/577763002

Cr-Commit-Position: refs/heads/master@{#295164}
parent e30f8f09
......@@ -2,12 +2,13 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file. */
#include_next <sys/time.h>
#ifndef LIBRARIES_NACL_IO_INCLUDE_SYS_TIME_H
#define LIBRARIES_NACL_IO_INCLUDE_SYS_TIME_H
#include <sys/cdefs.h>
#include <stdint.h>
#include_next <sys/time.h>
__BEGIN_DECLS
......
......@@ -2,11 +2,12 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file. */
#include_next <utime.h>
#ifndef LIBRARIES_NACL_IO_INCLUDE_UTIME_H_
#define LIBRARIES_NACL_IO_INCLUDE_UTIME_H_
#include <sys/cdefs.h>
#include_next <utime.h>
__BEGIN_DECLS
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment