From 511beddffab3c4fd43c75556132159117b6ba884 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Fri, 25 Nov 2011 09:45:25 -0800 Subject: [PATCH] XQuartz: Provide in-tree implementation of strndup(3) if needed This function was added to Mac OS X 10.7, so we need to provide it for earlier releases. Signed-off-by: Jeremy Huddleston --- hw/xquartz/mach-startup/Makefile.am | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hw/xquartz/mach-startup/Makefile.am b/hw/xquartz/mach-startup/Makefile.am index 0b1f8977e..21ad5b503 100644 --- a/hw/xquartz/mach-startup/Makefile.am +++ b/hw/xquartz/mach-startup/Makefile.am @@ -12,6 +12,13 @@ x11app_PROGRAMS = X11.bin dist_X11_bin_SOURCES = \ bundle-main.c +# strndup(3) was added in Mac OS X 10.7, but we do this unconditionally to deal +# with the case where we build on Lion but target Snow Leopard as the minimum +# OS version. +#if NEED_STRNDUP +dist_X11_bin_SOURCES += $(top_srcdir)/os/strndup.c +#endif + nodist_X11_bin_SOURCES = \ mach_startupServer.c \ mach_startupUser.c