Solaris: add proper POSIX defines
authorRodeo <tdskywalker@gmail.com>
Sat, 13 Jul 2013 10:55:12 +0000 (10:55 +0000)
committerRodeo <tdskywalker@gmail.com>
Sat, 13 Jul 2013 10:55:12 +0000 (10:55 +0000)
On Solaris, some POSIX functions are hidden behind a define. This patch adds the proper defines to the compiler command line when building for Solaris.

Patch by icchan. Thanks!

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5642 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/module.defs
test/module.defs

index 49df1b28f16542627ab1f166518ef4a298dda9aa..afaf6ffd124205e635126759b929bb0d95ddc2a9 100644 (file)
@@ -69,7 +69,7 @@ else ifeq ($(BUILD.system),mingw)
     LIBHB.GCC.D += SYS_MINGW PTW32_STATIC_LIB
        LIBHB.GCC.args.extra.dylib++ += -Wl,--enable-auto-import -static
 else ifeq ($(BUILD.system),solaris)
-    LIBHB.GCC.D += SYS_SunOS _LARGEFILE_SOURCE _FILE_OFFSET_BITS=64
+    LIBHB.GCC.D += SYS_SunOS _LARGEFILE_SOURCE _FILE_OFFSET_BITS=64 _POSIX_C_SOURCE=200112L __EXTENSIONS__
 else
     LIBHB.platform.D = SYS_UNKNOWN
 endif
index 590c49ea29527d39cdee5510ca715b3394059ca1..66e95f2ded71095948c1e4df60f749ef9f0a8662 100644 (file)
@@ -56,6 +56,7 @@ else ifeq ($(BUILD.system),linux)
     TEST.GCC.l += pthread dl m
 else ifeq ($(BUILD.system),solaris)
     TEST.GCC.l += pthread nsl socket iconv
+    TEST.GCC.D += _POSIX_C_SOURCE=200112L __EXTENSIONS__
 else ifeq (1-mingw,$(BUILD.cross)-$(BUILD.system))
 ifeq ($(HAS.dlfcn),1)
     TEST.GCC.l += dl