[mutter/wip/lantw/gethostname: 3/4] window-x11: Fix _XOPEN_SOURCE usage for gethostname on FreeBSD



commit 0185909ee3bedcb2732c9d23db104b24bb009dbb
Author: Ting-Wei Lan <lantw src gnome org>
Date:   Mon Jun 24 00:02:41 2019 +0800

    window-x11: Fix _XOPEN_SOURCE usage for gethostname on FreeBSD
    
    On FreeBSD, gethostname is guarded by '__POSIX_VISIBLE >= 200112', which
    requires either '_POSIX_C_SOURCE >= 200112' or '_XOPEN_SOURCE >= 600'.
    Defining _XOPEN_SOURCE to 500 does not break the build because of
    implicit declaration, but it defeats the purpose of defining the macro.
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/638

 src/x11/window-props.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/x11/window-props.c b/src/x11/window-props.c
index adaab0eba..48454befe 100644
--- a/src/x11/window-props.c
+++ b/src/x11/window-props.c
@@ -34,7 +34,7 @@
  * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#define _XOPEN_SOURCE 500 /* for gethostname() */
+#define _XOPEN_SOURCE 600 /* for gethostname() */
 
 #include "config.h"
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]