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
This commit is contained in:
Ting-Wei Lan 2019-06-24 00:02:41 +08:00 committed by Jonas Ådahl
parent c35e56196a
commit 0185909ee3

View File

@ -34,7 +34,7 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>. * 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" #include "config.h"