From 3ff8888f6629814bc5e09ccf9a144eaf6d7daaa1 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Wed, 20 Aug 2014 16:16:24 -0700 Subject: [PATCH] Only the Mac doesn't have open_memstream. We should probably move this into art, since they're the only people using it. Bug: 17164505 Change-Id: I67b8f0cbad4c6368d4424e6979d6b044dd36aa37 --- include/cutils/open_memstream.h | 4 ++-- libcutils/open_memstream.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/cutils/open_memstream.h b/include/cutils/open_memstream.h index b7998be0e..c1a81ebbc 100644 --- a/include/cutils/open_memstream.h +++ b/include/cutils/open_memstream.h @@ -19,7 +19,7 @@ #include -#ifndef HAVE_OPEN_MEMSTREAM +#if defined(__APPLE__) #ifdef __cplusplus extern "C" { @@ -31,6 +31,6 @@ FILE* open_memstream(char** bufp, size_t* sizep); } #endif -#endif /*!HAVE_OPEN_MEMSTREAM*/ +#endif /* __APPLE__ */ #endif /*__CUTILS_OPEN_MEMSTREAM_H__*/ diff --git a/libcutils/open_memstream.c b/libcutils/open_memstream.c index 5b4388af7..1c3732108 100644 --- a/libcutils/open_memstream.c +++ b/libcutils/open_memstream.c @@ -14,7 +14,7 @@ * limitations under the License. */ -#ifndef HAVE_OPEN_MEMSTREAM +#if defined(__APPLE__) /* * Implementation of the POSIX open_memstream() function, which Linux has @@ -378,4 +378,4 @@ DONE #endif -#endif /*!HAVE_OPEN_MEMSTREAM*/ +#endif /* __APPLE__ */