From 9f6172d669d53abbf3bf2a3546429cb5036e3d5f Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 14 Jan 2019 20:45:31 -0500 Subject: [PATCH] Move _POSIX_SOURCE definition Fixes https://github.com/harfbuzz/harfbuzz/issues/1308 --- src/hb-blob.cc | 9 +++++++++ src/hb.hh | 4 ---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/hb-blob.cc b/src/hb-blob.cc index b53b20bd1..c289fc635 100644 --- a/src/hb-blob.cc +++ b/src/hb-blob.cc @@ -25,6 +25,15 @@ * Red Hat Author(s): Behdad Esfahbod */ + +/* https://github.com/harfbuzz/harfbuzz/issues/1308 + * http://www.gnu.org/software/libc/manual/html_node/Feature-Test-Macros.html + * https://www.oracle.com/technetwork/articles/servers-storage-dev/standardheaderfiles-453865.html + */ +#ifndef _POSIX_C_SOURCE +#define _POSIX_C_SOURCE 200809L +#endif + #include "hb.hh" #include "hb-blob.hh" diff --git a/src/hb.hh b/src/hb.hh index 7d499096b..1aec868fc 100644 --- a/src/hb.hh +++ b/src/hb.hh @@ -59,10 +59,6 @@ # define __EXTENSIONS__ 1 #endif -#ifndef _POSIX_C_SOURCE -#define _POSIX_C_SOURCE 200809L -#endif - #if defined (_MSC_VER) && defined (HB_DLL_EXPORT) #define HB_EXTERN __declspec (dllexport) extern #endif