From 12cec6c12ec1856e483097e702126214dd25a34a Mon Sep 17 00:00:00 2001 From: Ebrahim Byagowi Date: Fri, 21 Jun 2019 22:39:42 +0430 Subject: [PATCH] Don't define hb_blob_create_from_file if HB_NO_OPEN is defined --- src/hb-blob.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/hb-blob.cc b/src/hb-blob.cc index 497df65fd..9ed26bd2f 100644 --- a/src/hb-blob.cc +++ b/src/hb-blob.cc @@ -487,6 +487,7 @@ hb_blob_t::try_make_writable () * Mmap */ +#ifndef HB_NO_OPEN #ifdef HAVE_MMAP # include # include @@ -543,10 +544,6 @@ _hb_mapped_file_destroy (void *file_) hb_blob_t * hb_blob_create_from_file (const char *file_name) { -#ifdef HB_NO_OPEN - return hb_blob_get_empty (); -#endif - /* Adopted from glib's gmappedfile.c with Matthias Clasen and Allison Lortie permission but changed a lot to suit our need. */ #if defined(HAVE_MMAP) && !defined(HB_NO_MMAP) @@ -680,3 +677,4 @@ fread_fail_without_close: free (data); return hb_blob_get_empty (); } +#endif /* !HB_NO_OPEN */