This is an automated email from the ASF dual-hosted git repository.

alexey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git


The following commit(s) were added to refs/heads/master by this push:
     new 00e78f589 [gutil] fix compilation warning on macOS
00e78f589 is described below

commit 00e78f58978c6d4f00871eb8bd91c29327799c76
Author: Alexey Serbin <[email protected]>
AuthorDate: Thu Nov 3 19:19:37 2022 -0700

    [gutil] fix compilation warning on macOS
    
    This patch fixes compilation warning on contemporary versions of Xcode
    (starting at least with Xcode 12.4):
    
      In file included from src/kudu/util/status.h:30:
      In file included from src/kudu/gutil/macros.h:14:
      src/kudu/gutil/port.h:237:9: warning: 'MSG_NOSIGNAL' macro redefined 
[-Wmacro-redefined]
      #define MSG_NOSIGNAL 0
              ^
      <SDK>/usr/include/sys/socket.h:588:9: note: previous definition is here
    
    Change-Id: Ie0ec3876ccb8dcc6f67725cfb4a7380b092e0384
    Reviewed-on: http://gerrit.cloudera.org:8080/19200
    Tested-by: Kudu Jenkins
    Reviewed-by: Yifan Zhang <[email protected]>
---
 src/kudu/gutil/port.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/kudu/gutil/port.h b/src/kudu/gutil/port.h
index f5155b2d5..a1ebd8557 100644
--- a/src/kudu/gutil/port.h
+++ b/src/kudu/gutil/port.h
@@ -233,8 +233,11 @@ inline size_t strnlen(const char *s, size_t maxlen) {
   return maxlen;
 }
 
-// Doesn't exist on OSX; used in google.cc for send() to mean "no flags".
+// MSG_NOSIGNAL doesn't exist on earlier versions of Darwin/OSX;
+// it's used in google.cc for send() to mean "no flags".
+#if !defined(MSG_NOSIGNAL)
 #define MSG_NOSIGNAL 0
+#endif
 
 // No SIGPWR on MacOSX.  SIGINFO seems suitably obscure.
 #undef GOOGLE_OBSCURE_SIGNAL

Reply via email to