From d5fc593b5f511386bef526cd454b473614de4a1f Mon Sep 17 00:00:00 2001 From: John Barboza Date: Wed, 31 May 2017 06:08:44 -0400 Subject: [PATCH] zos: avoid compiler warnings Some of these compiler flags are not supported. So don't use them. PR-URL: https://github.com/libuv/libuv/pull/1373 Reviewed-By: Colin Ihrig --- common.gypi | 12 +++++++++--- src/unix/core.c | 5 ++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/common.gypi b/common.gypi index 94e76003..ec482340 100644 --- a/common.gypi +++ b/common.gypi @@ -49,9 +49,6 @@ 'cflags': [ '-O3', '-fstrict-aliasing', - '-fomit-frame-pointer', - '-fdata-sections', - '-ffunction-sections', ], 'msvs_settings': { 'VCCLCompilerTool': { @@ -82,6 +79,15 @@ 'LinkIncremental': 1, # disable incremental linking }, }, + 'conditions': [ + ['OS != "os390"', { + 'cflags': [ + '-fomit-frame-pointer', + '-fdata-sections', + '-ffunction-sections', + ], + }], + ] } }, 'msvs_settings': { diff --git a/src/unix/core.c b/src/unix/core.c index 8276c604..4c744925 100644 --- a/src/unix/core.c +++ b/src/unix/core.c @@ -28,7 +28,6 @@ #include #include #include -#include /* MAXHOSTNAMELEN on Linux and the BSDs */ #include #include #include @@ -82,6 +81,10 @@ #include #endif +#if !defined(__MVS__) +#include /* MAXHOSTNAMELEN on Linux and the BSDs */ +#endif + /* Fallback for the maximum hostname length */ #ifndef MAXHOSTNAMELEN # define MAXHOSTNAMELEN 256