Skip to content

Commit

Permalink
blaze_util_posix.cc: fix order of #define
Browse files Browse the repository at this point in the history
On some systems (including some versions of FreeBSD) it is a requirement
that _WITH_DPRINTF be defined for <stdio.h> to provide the appropriate
header for dprintf(3). Therefore, the respective #define has to come
before any #include as those might pull is <stdio.h>.

Change-Id: I25d55c9c7c0912e8619faf774d2e09f9af9a6a53
PiperOrigin-RevId: 203351202
  • Loading branch information
aehlig authored and Copybara-Service committed Jul 5, 2018
1 parent 2282728 commit 1021965
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/cpp/blaze_util_posix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#define _WITH_DPRINTF
#include "src/main/cpp/blaze_util_platform.h"

#define _WITH_DPRINTF
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
Expand Down

0 comments on commit 1021965

Please sign in to comment.